Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Commit

Permalink
Fix clippy complaints in build.rs
Browse files Browse the repository at this point in the history
Clippy doesn't like `if !thing.ok() { panic!(msg) }`.
Clippy prefers `assert!(thing_ok(), msg)`.
Ok, clippy.

Signed-off-by: Will Woods <[email protected]>
  • Loading branch information
wgwoods committed Sep 30, 2021
1 parent 8229865 commit 50eb2f6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ fn build_rs_tests(in_path: &Path, out_path: &Path) {
.status()
.unwrap_or_else(|_| panic!("failed to compile {:#?}", &in_source));

if !status.success() {
panic!("Failed to compile {:?}", &in_source);
}
assert!(status.success(), "Failed to compile {:?}", &in_source);
}
}

Expand All @@ -105,9 +103,7 @@ fn build_cc_tests(in_path: &Path, out_path: &Path) {
.status()
.unwrap_or_else(|_| panic!("failed to compile {:#?}", &in_source));

if !status.success() {
panic!("Failed to compile {:?}", &in_source);
}
assert!(status.success(), "Failed to compile {:?}", &in_source);
}
}

Expand Down

0 comments on commit 50eb2f6

Please sign in to comment.