flake updates + clippy fixes

This commit is contained in:
Robin Appelman 2025-08-17 16:32:40 +02:00
commit 5d9cf6de77
6 changed files with 35 additions and 35 deletions

42
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"crane": { "crane": {
"locked": { "locked": {
"lastModified": 1742394900, "lastModified": 1751562746,
"narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=", "narHash": "sha256-smpugNIkmDeicNz301Ll1bD7nFOty97T79m4GUMUczA=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd", "rev": "aed2020fd3dc26e1e857d4107a5a67a33ab6c1fd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,11 +22,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1748263617, "lastModified": 1754916855,
"narHash": "sha256-O1xypYFWzYlfiyO3fUZuzRhYac5DGptP+ZhocY9L5tQ=", "narHash": "sha256-cxB66spsXhlpc/qbhgz0ZOUtfnnKstMMwZaIG+TF8yA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flakelight", "repo": "flakelight",
"rev": "65c783ba2b85910df5a053cb1451e9eb13794c12", "rev": "621ef8ddbcc86a21fb133f6460f2a3be4afad8c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -44,26 +44,26 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1747926214, "lastModified": 1752438127,
"narHash": "sha256-e/7klyoQpe9wsYeQIUfm/9Yqa78et24L+nSpsCz937k=", "narHash": "sha256-1NKLbztqg0/sYUhZgxus+WJU+jZThkV+pga/kqjB3/A=",
"owner": "icewind1991", "ref": "refs/heads/main",
"repo": "mill-scale", "rev": "31877680aa6d391e59a598d35081e24b4316ab9a",
"rev": "394979573123e5d4762d29cc78b5e11b3d35cc6b", "revCount": 60,
"type": "github" "type": "git",
"url": "https://codeberg.org/icewind/mill-scale.git"
}, },
"original": { "original": {
"owner": "icewind1991", "type": "git",
"repo": "mill-scale", "url": "https://codeberg.org/icewind/mill-scale.git"
"type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1748437600, "lastModified": 1755274400,
"narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=", "narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7282cb574e0607e65224d33be8241eae7cfe0979", "rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -88,11 +88,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742697269, "lastModified": 1752374969,
"narHash": "sha256-Lpp0XyAtIl1oGJzNmTiTGLhTkcUjwSkEb0gOiNzYFGM=", "narHash": "sha256-Ky3ynEkJXih7mvWyt9DWoiSiZGqPeHLU1tlBU4b0mcc=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "01973c84732f9275c50c5f075dd1f54cc04b3316", "rev": "75fb000638e6d0f57cb1e8b7a4550cbdd8c76f1d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -6,7 +6,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
mill-scale = { mill-scale = {
url = "github:icewind1991/mill-scale"; url = "git+https://codeberg.org/icewind/mill-scale.git";
inputs.flakelight.follows = "flakelight"; inputs.flakelight.follows = "flakelight";
}; };
}; };

View file

@ -96,7 +96,7 @@ impl Display for TokenList {
let mut tokens = self.0[0..self.0.len() - 1].iter(); let mut tokens = self.0[0..self.0.len() - 1].iter();
write!(f, "{}", tokens.next().unwrap())?; write!(f, "{}", tokens.next().unwrap())?;
for token in tokens { for token in tokens {
write!(f, ", {}", token)?; write!(f, ", {token}")?;
} }
if self.0.len() > 1 { if self.0.len() > 1 {
write!(f, " or {}", self.0.last().unwrap())?; write!(f, " or {}", self.0.last().unwrap())?;

View file

@ -300,14 +300,14 @@ impl From<HashMap<Key, Value>> for Value {
impl Display for Value { impl Display for Value {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self { match self {
Value::Bool(val) => write!(f, "{}", val), Value::Bool(val) => write!(f, "{val}"),
Value::Int(val) => write!(f, "{}", val), Value::Int(val) => write!(f, "{val}"),
Value::Float(val) => write!(f, "{}", val), Value::Float(val) => write!(f, "{val}"),
Value::String(val) => write!(f, "{}", val), Value::String(val) => write!(f, "{val}"),
Value::Array(val) => { Value::Array(val) => {
writeln!(f, "[")?; writeln!(f, "[")?;
for (key, value) in val.iter() { for (key, value) in val.iter() {
write!(f, "\t{} => {},", key, value)?; write!(f, "\t{key} => {value},")?;
} }
write!(f, "]") write!(f, "]")
} }
@ -479,8 +479,8 @@ impl Index<i64> for Value {
impl Display for Key { impl Display for Key {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self { match self {
Key::Int(val) => write!(f, "{}", val), Key::Int(val) => write!(f, "{val}"),
Key::String(val) => write!(f, "{}", val), Key::String(val) => write!(f, "{val}"),
} }
} }
} }
@ -567,7 +567,7 @@ impl<'de> Visitor<'de> for ValueVisitor {
E: de::Error, E: de::Error,
{ {
Ok(Value::Int(v.try_into().map_err(|_| { Ok(Value::Int(v.try_into().map_err(|_| {
E::custom(format!("i64 out of range: {}", v)) E::custom(format!("i64 out of range: {v}"))
})?)) })?))
} }
@ -725,7 +725,7 @@ impl<'de> Visitor<'de> for KeyVisitor {
E: de::Error, E: de::Error,
{ {
Ok(Key::Int(v.try_into().map_err(|_| { Ok(Key::Int(v.try_into().map_err(|_| {
E::custom(format!("i64 out of range: {}", v)) E::custom(format!("i64 out of range: {v}"))
})?)) })?))
} }

View file

@ -647,7 +647,7 @@ impl<'de> MapAccess<'de> for ArrayWalker<'de, '_> {
self.next_int_key += 1; self.next_int_key += 1;
self.de.push_peeked(next); self.de.push_peeked(next);
self.de.push_peeked(token); self.de.push_peeked(token);
seed.deserialize(format!("{}", key).into_deserializer()) seed.deserialize(key.to_string().into_deserializer())
.map(Some) .map(Some)
} }
} }
@ -768,7 +768,7 @@ mod tests {
match super::from_str(source) { match super::from_str(source) {
Ok(res) => Ok(res), Ok(res) => Ok(res),
Err(err) => { Err(err) => {
eprintln!("{}", err); eprintln!("{err}");
Err(err) Err(err)
} }
} }

View file

@ -5,7 +5,7 @@ fn parse(source: &str) -> Result<Value, ParseError> {
match from_str(source) { match from_str(source) {
Ok(res) => Ok(res), Ok(res) => Ok(res),
Err(err) => { Err(err) => {
eprintln!("{}", err); eprintln!("{err}");
Err(err) Err(err)
} }
} }