Skip to content

Commit 1f8894c

Browse files
committed
examples: Use Display for Duration in check example
1 parent c35504f commit 1f8894c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

examples/check.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ fn main() {
3131

3232
let now = Instant::now();
3333
let dict = Dictionary::new(EN_US_AFF, EN_US_DIC).unwrap();
34-
println!("Compiled the dictionary in {}ms", now.elapsed().as_millis());
34+
println!("Compiled the dictionary in {:?}", now.elapsed());
3535

3636
let now = Instant::now();
3737
if dict.check(&word) {
3838
println!(
39-
"\"{word}\" is in the dictionary (checked in {}µs)",
40-
now.elapsed().as_micros()
39+
"\"{word}\" is in the dictionary (checked in {:?})",
40+
now.elapsed()
4141
);
4242
} else {
4343
eprintln!(
44-
"\"{word}\" is NOT in the dictionary (checked in {}µs)",
45-
now.elapsed().as_micros()
44+
"\"{word}\" is NOT in the dictionary (checked in {:?})",
45+
now.elapsed()
4646
);
4747
std::process::exit(1);
4848
}

0 commit comments

Comments
 (0)