clippy fixes

This commit is contained in:
Robin Appelman 2024-12-24 15:56:19 +01:00
commit d32f3674f3
3 changed files with 12 additions and 15 deletions

15
flake.lock generated
View file

@ -44,14 +44,17 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1734998048,
"narHash": "sha256-EzIE9/jrgvUdNxvZrjD+qqkH5AHaaEbJDsLDzSuizYw=",
"path": "/home/robin/Projects/mill-scale",
"type": "path"
"lastModified": 1735052218,
"narHash": "sha256-I30wh6G8fSUO4EseexxiDXcxyUhXR6C8BvEeKn6xyfE=",
"owner": "icewind1991",
"repo": "mill-scale",
"rev": "7e45bb598ff63a8416ee3c26743b20644563bd93",
"type": "github"
},
"original": {
"path": "/home/robin/Projects/mill-scale",
"type": "path"
"owner": "icewind1991",
"repo": "mill-scale",
"type": "github"
}
},
"nixpkgs": {

View file

@ -6,8 +6,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
mill-scale = {
# url = "github:icewind1991/mill-scale";
url = "path:/home/robin/Projects/mill-scale";
url = "github:icewind1991/mill-scale";
inputs.flakelight.follows = "flakelight";
};
};

View file

@ -270,10 +270,11 @@ pub struct ChatMessage {
}
/// Order for listing demos
#[derive(Debug, Clone, Copy, Serialize)]
#[derive(Debug, Clone, Copy, Serialize, Default)]
#[serde(into = "&str")]
pub enum ListOrder {
Ascending,
#[default]
Descending,
}
@ -290,12 +291,6 @@ pub enum GameType {
Fours,
}
impl Default for ListOrder {
fn default() -> Self {
ListOrder::Descending
}
}
impl Display for ListOrder {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
Display::fmt(<&str>::from(*self), f)