Skip to content

Commit

Permalink
examples: Use Display for Duration in check example
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Nov 14, 2024
1 parent c35504f commit 1f8894c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ fn main() {

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

let now = Instant::now();
if dict.check(&word) {
println!(
"\"{word}\" is in the dictionary (checked in {}µs)",
now.elapsed().as_micros()
"\"{word}\" is in the dictionary (checked in {:?})",
now.elapsed()
);
} else {
eprintln!(
"\"{word}\" is NOT in the dictionary (checked in {}µs)",
now.elapsed().as_micros()
"\"{word}\" is NOT in the dictionary (checked in {:?})",
now.elapsed()
);
std::process::exit(1);
}
Expand Down

0 comments on commit 1f8894c

Please sign in to comment.