Skip to content

Commit

Permalink
fix some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
llogiq committed Jul 21, 2017
1 parent a67ee91 commit 144bcd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ impl<T: Write> ConsoleTestState<T> {
}

pub fn write_run_finish(&mut self) -> io::Result<bool> {
assert!(self.passed + self.failed + self.ignored + self.measured == self.total);
assert_eq!(self.passed + self.failed + self.ignored + self.measured, self.total);

let success = self.failed == 0;
if !success {
Expand Down Expand Up @@ -565,11 +565,11 @@ fn run_test(_opts: &TestOpts,
match testfn {
DynBenchFn(bencher) => {
let bs = ::bench::benchmark(|harness| bencher.run(harness));
return (desc, TrBench(bs), Vec::new());
(desc, TrBench(bs), Vec::new())
}
StaticBenchFn(benchfn) => {
let bs = ::bench::benchmark(|harness| benchfn(harness));
return (desc, TrBench(bs), Vec::new());
(desc, TrBench(bs), Vec::new())
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ macro_rules! benchmark_main {
use $crate::run_tests_console;
let mut test_opts = TestOpts::default();
// check to see if we should filter:
for arg in ::std::env::args().skip(1).filter(|arg| *arg != "--bench") {
if let Some(arg) = ::std::env::args().skip(1).find(|arg| *arg != "--bench") {
test_opts.filter = Some(arg);
break;
}
let mut benches = Vec::new();
$(
Expand Down

0 comments on commit 144bcd4

Please sign in to comment.