fix clippy issues
This commit is contained in:
parent
46953b1da0
commit
fc1ef14d03
@ -130,12 +130,12 @@ pub async fn delete_playlist(
|
|||||||
|
|
||||||
if playlist_path.is_file() {
|
if playlist_path.is_file() {
|
||||||
match fs::remove_file(playlist_path) {
|
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) => {
|
Err(e) => {
|
||||||
error!("{e}");
|
error!("{e}");
|
||||||
return Err(ServiceError::InternalServerError);
|
Err(ServiceError::InternalServerError)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
Ok(format!("No playlist to delete on: {date}"))
|
Ok(format!("No playlist to delete on: {date}"))
|
||||||
}
|
}
|
||||||
|
@ -1009,7 +1009,7 @@ pub mod mock_time {
|
|||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
thread_local! {
|
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> {
|
pub fn time_now() -> DateTime<Local> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user