diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-07-27 11:11:18 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-07-27 11:11:18 +0200 |
| commit | 57a5a9b05423c4f832cd9a3aaa7e06d55fab6efa (patch) | |
| tree | e376fc76ea7242b63d95e6c68e7955c627b785bf /src/libcore/tests | |
| parent | 3d0e93309d61636585cfe5ac75c0db8cb5ba03e1 (diff) | |
| download | rust-57a5a9b05423c4f832cd9a3aaa7e06d55fab6efa.tar.gz rust-57a5a9b05423c4f832cd9a3aaa7e06d55fab6efa.zip | |
Prefer to_string() to format!()
Diffstat (limited to 'src/libcore/tests')
| -rw-r--r-- | src/libcore/tests/str_lossy.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/tests/str_lossy.rs b/src/libcore/tests/str_lossy.rs index 69e28256da9..56ef3f070c1 100644 --- a/src/libcore/tests/str_lossy.rs +++ b/src/libcore/tests/str_lossy.rs @@ -79,7 +79,7 @@ fn chunks() { fn display() { assert_eq!( "Hello\u{FFFD}\u{FFFD} There\u{FFFD} Goodbye", - &format!("{}", Utf8Lossy::from_bytes(b"Hello\xC0\x80 There\xE6\x83 Goodbye"))); + &Utf8Lossy::from_bytes(b"Hello\xC0\x80 There\xE6\x83 Goodbye").to_string()); } #[test] |
