diff --git a/Cargo.toml b/Cargo.toml index 9b1a61b..b15b8bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,3 @@ edition = "2024" clap = { version = "4.5.37", features = ["derive"] } colored = "3.0.0" regex = "1.11.1" - -[workspace.lints.clippy] -pedantic = { level = "warn", priority = -1 } diff --git a/src/main.rs b/src/main.rs index 261f2b0..8202bdd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -217,7 +217,7 @@ fn check_nix_available() -> bool { nix_available.is_some() && nix_query_available.is_some() } -fn get_closure_size(path: &std::path::Path) -> u64 { +fn get_closure_size(path: &std::path::Path) -> i64 { Command::new("nix") .arg("path-info") .arg("--closure-size") @@ -229,9 +229,8 @@ fn get_closure_size(path: &std::path::Path) -> u64 { .ok()? .split_whitespace() .last()? - .parse::() + .parse::() .ok() }) - .map(|size| size / 1024 / 1024) - .unwrap_or(0) + .map_or(0, |size| size / 1024 / 1024) }