diff options
author | Matan Kushner <hello@matchai.me> | 2019-04-04 21:35:24 -0400 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-04-04 21:35:24 -0400 |
commit | c79cbe63b147b3e6e490f662f06d317e441ad2c4 (patch) | |
tree | 704418a5cab61f354aeff8c2c1850796267acde9 /benches | |
parent | 472b66894d10e5be9cfb5a40b79dc61e746c0795 (diff) |
Add stringify_segment rustdoc
Diffstat (limited to 'benches')
-rw-r--r-- | benches/benchmarks.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index e72d9b090..beb7eede7 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -4,13 +4,13 @@ extern crate test; #[cfg(test)] mod tests { + use clap::{App, Arg}; use starship::{modules, print}; use test::Bencher; - use clap::{App, Arg}; #[bench] fn full_prompt_bench(b: &mut Bencher) { - b.iter(||{ + b.iter(|| { let args = App::new("starship") .arg(Arg::with_name("status_code")) .get_matches_from(vec!["starship", "0"]); @@ -25,7 +25,7 @@ mod tests { let args = App::new("starship") .arg(Arg::with_name("status_code")) .get_matches_from(vec!["starship", "0"]); - + let segment = modules::handle("char", &args); print::stringify_segment(segment) }); @@ -37,7 +37,7 @@ mod tests { let args = App::new("starship") .arg(Arg::with_name("status_code")) .get_matches_from(vec!["starship", "0"]); - + let segment = modules::handle("dir", &args); print::stringify_segment(segment) }); |