Skip to content

Commit

Permalink
Fix two CI lint errors reported by clippy.
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Zellweger <[email protected]>
  • Loading branch information
gz committed Dec 14, 2023
1 parent 41cbc1d commit 12ea985
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/datetime/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ fn signed_duration_since_autoref() {
let dt1 = Utc.with_ymd_and_hms(2014, 5, 6, 7, 8, 9).unwrap();
let dt2 = Utc.with_ymd_and_hms(2014, 3, 4, 5, 6, 7).unwrap();
let diff1 = dt1.signed_duration_since(dt2); // Copy/consume
let diff2 = dt2.signed_duration_since(&dt1); // Take by reference
let diff2 = dt2.signed_duration_since(dt1); // Take by reference
assert_eq!(diff1, -diff2);

let diff1 = dt1 - &dt2; // We can choose to substract rhs by reference
Expand Down
2 changes: 1 addition & 1 deletion src/format/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ where
};
s = match s.len() {
len if len >= 2 => &s[2..],
len if len == 0 => s,
0 => s,
_ => return Err(TOO_SHORT),
};

Expand Down

0 comments on commit 12ea985

Please sign in to comment.