Skip to content

Commit

Permalink
remove expect for now, to allow release build
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrtgs committed Sep 5, 2024
1 parent 08cbc09 commit 37b9880
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Item = Cow<'static, str>> + Clone {
let mut allow_args = ["--v4", "--v6"].into_iter();
match self.allow_protocol() {
Expand Down
6 changes: 4 additions & 2 deletions src/cli/startup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
(|| {
Expand Down Expand Up @@ -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<P: AsRef<Path>>(path: P) -> io::Result<()> {
std::fs::remove_file(path).or_else(|e| match e.kind() {
ErrorKind::NotFound => Ok(()),
Expand Down

0 comments on commit 37b9880

Please sign in to comment.