From 37b9880c8a43daeee75a7a9e69363648e80b65db Mon Sep 17 00:00:00 2001 From: Vrtgs Date: Fri, 6 Sep 2024 00:54:41 +0300 Subject: [PATCH] remove expect for now, to allow release build --- src/cli/mod.rs | 3 ++- src/cli/startup/mod.rs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 7a8bc57..df86c82 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -72,7 +72,8 @@ impl RunArgs { } impl RunArgs { - #[cfg_attr(target_os = "linux", expect(dead_code))] + // #[cfg_attr(target_os = "linux", expect(dead_code))] + #[cfg_attr(target_os = "linux", allow(dead_code))] pub fn args(&self) -> impl Iterator> + Clone { let mut allow_args = ["--v4", "--v6"].into_iter(); match self.allow_protocol() { diff --git a/src/cli/startup/mod.rs b/src/cli/startup/mod.rs index 7f65079..4772d4a 100644 --- a/src/cli/startup/mod.rs +++ b/src/cli/startup/mod.rs @@ -3,7 +3,8 @@ use std::io; use std::io::ErrorKind; use std::path::Path; -#[cfg_attr(windows, expect(unused_macros))] +// #[cfg_attr(windows, expect(unused_macros))] +#[cfg_attr(windows, allow(unused_macros))] macro_rules! cmd { ($exe: literal $($arg: expr)*; option: propagate) => { (|| { @@ -36,7 +37,8 @@ fn exe_path() -> String { .expect("the current exes path contains invalid utf-8") } -#[cfg_attr(windows, expect(dead_code))] +// #[cfg_attr(windows, expect(dead_code))] +#[cfg_attr(windows, allow(dead_code))] fn rm_file>(path: P) -> io::Result<()> { std::fs::remove_file(path).or_else(|e| match e.kind() { ErrorKind::NotFound => Ok(()),