Skip to content

Commit 25900c2

Browse files
Tweak integer to string conversion test a bit to be future-proof
1 parent bacd57a commit 25900c2

File tree

1 file changed

+2
-2
lines changed
  • library/alloctests/tests

1 file changed

+2
-2
lines changed

library/alloctests/tests/num.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use std::str::FromStr;
33

44
fn assert_nb<Int: ToString + FromStr + Debug + Display + Eq>(value: Int) {
55
let s = value.to_string();
6-
let s2 = format!("{}", value);
6+
let s2 = format!("s: {}.", value);
77

8-
assert_eq!(s, s2);
8+
assert_eq!(format!("s: {s}."), s2);
99
let Ok(ret) = Int::from_str(&s) else {
1010
panic!("failed to convert into to string");
1111
};

0 commit comments

Comments
 (0)