From fc1ef14d03f719422711d61c1868a87f41975776 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Wed, 27 Mar 2024 11:37:26 +0100 Subject: [PATCH] fix clippy issues --- ffplayout-api/src/utils/playlist.rs | 6 +++--- lib/src/utils/mod.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ffplayout-api/src/utils/playlist.rs b/ffplayout-api/src/utils/playlist.rs index 732cae3d..55022843 100644 --- a/ffplayout-api/src/utils/playlist.rs +++ b/ffplayout-api/src/utils/playlist.rs @@ -130,12 +130,12 @@ pub async fn delete_playlist( if playlist_path.is_file() { match fs::remove_file(playlist_path) { - Ok(_) => return Ok(format!("Delete playlist from {date} success!")), + Ok(_) => Ok(format!("Delete playlist from {date} success!")), Err(e) => { error!("{e}"); - return Err(ServiceError::InternalServerError); + Err(ServiceError::InternalServerError) } - }; + } } else { Ok(format!("No playlist to delete on: {date}")) } diff --git a/lib/src/utils/mod.rs b/lib/src/utils/mod.rs index 857fda1b..e8012be7 100644 --- a/lib/src/utils/mod.rs +++ b/lib/src/utils/mod.rs @@ -1009,7 +1009,7 @@ pub mod mock_time { use std::cell::RefCell; thread_local! { - static DATE_TIME_DIFF: RefCell> = RefCell::new(None); + static DATE_TIME_DIFF: RefCell> = const { RefCell::new(None) }; } pub fn time_now() -> DateTime {