cargo clippy
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
DbSongInfo, Priority, SongId, SongPosition,
|
||||
DbSongInfo,
|
||||
commands::{Command, CommandRequest, CommandResponse, RequestParserError, ResponseParserError},
|
||||
common::types::{PlaylistName, WindowRange},
|
||||
request_tokenizer::RequestTokenizer,
|
||||
|
||||
@@ -62,18 +62,15 @@ impl FromStr for Sort {
|
||||
|
||||
impl Display for Sort {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Sort { descending, key } => {
|
||||
if *descending {
|
||||
write!(f, "-")?;
|
||||
}
|
||||
match key {
|
||||
SortKey::LastModified => write!(f, "last-modified"),
|
||||
SortKey::Added => write!(f, "added"),
|
||||
SortKey::Prio => write!(f, "prio"),
|
||||
SortKey::Tag(tag) => write!(f, "{}", tag),
|
||||
}
|
||||
}
|
||||
let Sort { descending, key } = self;
|
||||
if *descending {
|
||||
write!(f, "-")?;
|
||||
}
|
||||
match key {
|
||||
SortKey::LastModified => write!(f, "last-modified"),
|
||||
SortKey::Added => write!(f, "added"),
|
||||
SortKey::Prio => write!(f, "prio"),
|
||||
SortKey::Tag(tag) => write!(f, "{}", tag),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user