diff --git a/Cargo.toml b/Cargo.toml index 1812ec0..cecdf7f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/kpcyrd/sniffglue" categories = ["command-line-utilities"] readme = "README.md" exclude = ["pcaps/**/*", "**/*.pcap"] -edition = "2018" +edition = "2021" [package.metadata.deb] license-file = [ "LICENSE" ] diff --git a/src/sandbox/config.rs b/src/sandbox/config.rs index 1079a15..ab7db5e 100644 --- a/src/sandbox/config.rs +++ b/src/sandbox/config.rs @@ -28,13 +28,7 @@ pub fn find() -> Option { } }; - for config_path in paths { - if Path::new(&config_path).exists() { - return Some(config_path); - } - } - - None + paths.into_iter().find(|p| Path::new(&p).exists()) } pub fn load(path: &str) -> Result {