Skip to content

Commit 0b7a80d

Browse files
committed
Use new-style format strings
1 parent e22d277 commit 0b7a80d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,7 @@ impl<E: fmt::Debug + Error + 'static> Error for ParseNotNanError<E> {
19111911
impl<E: fmt::Display> fmt::Display for ParseNotNanError<E> {
19121912
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19131913
match self {
1914-
ParseNotNanError::ParseFloatError(e) => write!(f, "Parse error: {}", e),
1914+
ParseNotNanError::ParseFloatError(e) => write!(f, "Parse error: {e}"),
19151915
ParseNotNanError::IsNaN => write!(f, "NotNan parser encounter a NaN"),
19161916
}
19171917
}

tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ fn hash_is_good_for_whole_numbers() {
475475
// many, but should guard against transient issues
476476
// that will result from using RandomState
477477
let pct_unique = set.len() as f64 / limit as f64;
478-
assert!(0.99f64 < pct_unique, "percent-unique={}", pct_unique);
478+
assert!(0.99f64 < pct_unique, "percent-unique={pct_unique}");
479479
}
480480

481481
#[test]
@@ -494,7 +494,7 @@ fn hash_is_good_for_fractional_numbers() {
494494
// many, but should guard against transient issues
495495
// that will result from using RandomState
496496
let pct_unique = set.len() as f64 / limit as f64;
497-
assert!(0.99f64 < pct_unique, "percent-unique={}", pct_unique);
497+
assert!(0.99f64 < pct_unique, "percent-unique={pct_unique}");
498498
}
499499

500500
#[test]

0 commit comments

Comments
 (0)