Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Aug 26, 2023
1 parent 9a53561 commit eb866d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions benchmarks/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ setup_benchmark! {
let mut last_hour = 0;
for t in &mut res.arr {
*t = last;
t.replace_hour(last_hour).unwrap();
t.replace_hour(last_hour).expect("failed to replace hour");
last += 997.std_milliseconds();
last_hour = (last_hour + 5) % 24;
}
Expand Down Expand Up @@ -254,7 +254,7 @@ setup_benchmark! {
let mut last_hour = 0;
for t in &mut res.arr {
*t = last;
t.replace_hour(last_hour).unwrap();
t.replace_hour(last_hour).expect("failed to replace hour");
last += 997.std_milliseconds();
last_hour = (last_hour + 5) % 24;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,14 +943,14 @@ fn arithmetic_regression() {

#[test]
fn sum_iter_ref() {
let i = vec![1.6.seconds(), 1.6.seconds()];
let i = [1.6.seconds(), 1.6.seconds()];
let sum = i.iter().sum::<Duration>();
assert_eq!(sum, 3.2.seconds());
}

#[test]
fn sum_iter() {
let i = vec![1.6.seconds(), 1.6.seconds()];
let i = [1.6.seconds(), 1.6.seconds()];
let sum = i.into_iter().sum::<Duration>();
assert_eq!(sum, 3.2.seconds());
}

0 comments on commit eb866d4

Please sign in to comment.