diff --git a/flake.nix b/flake.nix index 3051c9d..e41879b 100644 --- a/flake.nix +++ b/flake.nix @@ -42,7 +42,7 @@ rustStable = (import fenix {inherit pkgs;}).fromToolchainFile { file = ./rust-toolchain.toml; - sha256 = "sha256-e4mlaJehWBymYxJGgnbuCObVlqMlQSilZ8FljG9zPHY="; + sha256 = "sha256-+syqAd2kX8KVa8/U2gz3blIQTTsYYt3U63xBWaGOSc8="; }; craneLib = (crane.mkLib pkgs).overrideToolchain rustStable; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 91f50b4..a5b0afc 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.76.0" +channel = "1.77.0" components = ["clippy", "rustfmt", "rust-src"] targets = ["x86_64-unknown-linux-gnu"] profile = "minimal" diff --git a/src/main.rs b/src/main.rs index 6619a46..222ebe3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,7 +41,7 @@ fn main() -> Result<()> { let write_file = File::create(val).unwrap(); let mut writer = BufWriter::new(&write_file); match write!(&mut writer, "{contents}") { - Ok(_) => {} + Ok(()) => {} Err(e) => eprintln!("{e}"), }; } else { @@ -55,8 +55,7 @@ fn parse_sources_config_file(filepath: &str) -> HashMap { if let Ok(file) = File::open(filepath) { BufReader::new(file) .lines() - .filter(std::result::Result::is_ok) - .map(std::result::Result::unwrap) + .map_while(Result::ok) .for_each(|line| { let vec: Vec<&str> = line.split('|').collect(); list.insert(