fix clippy issues

This commit is contained in:
jb-alvarado 2024-03-27 11:37:26 +01:00
parent 46953b1da0
commit fc1ef14d03
2 changed files with 4 additions and 4 deletions

View File

@ -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}"))
}

View File

@ -1009,7 +1009,7 @@ pub mod mock_time {
use std::cell::RefCell;
thread_local! {
static DATE_TIME_DIFF: RefCell<Option<TimeDelta>> = RefCell::new(None);
static DATE_TIME_DIFF: RefCell<Option<TimeDelta>> = const { RefCell::new(None) };
}
pub fn time_now() -> DateTime<Local> {