From e73f4ff66173fedb5d807f5facaf0973aff4d739 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Fri, 26 Jul 2024 22:45:30 +0200 Subject: [PATCH] Fix clippy issues --- src/backends.rs | 1 + src/feed.rs | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/backends.rs b/src/backends.rs index 909423a..327486c 100644 --- a/src/backends.rs +++ b/src/backends.rs @@ -41,6 +41,7 @@ pub(crate) enum Backends { #[enum_dispatch] pub(crate) trait Backend { /// Returns the name of the backend. + #[allow(unused)] // For future use! fn name(&self) -> &'static str; /// Returns the channel with its currently contained content items. diff --git a/src/feed.rs b/src/feed.rs index fde2953..12a65ef 100644 --- a/src/feed.rs +++ b/src/feed.rs @@ -20,13 +20,7 @@ use crate::Config; /// 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 { let category = CategoryBuilder::default() - .name( - channel - .categories - .first() - .map(Clone::clone) - .unwrap_or_default(), - ) + .name(channel.categories.first().cloned().unwrap_or_default()) .build(); let unix_timestamp = NaiveDateTime::from_timestamp_opt(0, 0) .expect("Out-of-range seconds or invalid nanoseconds");