Fix clippy issues
All checks were successful
Check, lint and test / Check, lint and test (push) Successful in 49s
All checks were successful
Check, lint and test / Check, lint and test (push) Successful in 49s
This commit is contained in:
parent
526c3aa30c
commit
e73f4ff661
2 changed files with 2 additions and 7 deletions
|
@ -41,6 +41,7 @@ pub(crate) enum Backends {
|
||||||
#[enum_dispatch]
|
#[enum_dispatch]
|
||||||
pub(crate) trait Backend {
|
pub(crate) trait Backend {
|
||||||
/// Returns the name of the backend.
|
/// Returns the name of the backend.
|
||||||
|
#[allow(unused)] // For future use!
|
||||||
fn name(&self) -> &'static str;
|
fn name(&self) -> &'static str;
|
||||||
|
|
||||||
/// Returns the channel with its currently contained content items.
|
/// Returns the channel with its currently contained content items.
|
||||||
|
|
|
@ -20,13 +20,7 @@ use crate::Config;
|
||||||
/// It requires the backend and configuration to be able to construct download URLs.
|
/// It requires the backend and configuration to be able to construct download URLs.
|
||||||
pub(crate) fn construct(backend_id: &str, config: &Config, channel: Channel) -> rss::Channel {
|
pub(crate) fn construct(backend_id: &str, config: &Config, channel: Channel) -> rss::Channel {
|
||||||
let category = CategoryBuilder::default()
|
let category = CategoryBuilder::default()
|
||||||
.name(
|
.name(channel.categories.first().cloned().unwrap_or_default())
|
||||||
channel
|
|
||||||
.categories
|
|
||||||
.first()
|
|
||||||
.map(Clone::clone)
|
|
||||||
.unwrap_or_default(),
|
|
||||||
)
|
|
||||||
.build();
|
.build();
|
||||||
let unix_timestamp = NaiveDateTime::from_timestamp_opt(0, 0)
|
let unix_timestamp = NaiveDateTime::from_timestamp_opt(0, 0)
|
||||||
.expect("Out-of-range seconds or invalid nanoseconds");
|
.expect("Out-of-range seconds or invalid nanoseconds");
|
||||||
|
|
Loading…
Reference in a new issue