1
Fork 0

Rollup merge of #56656 - BeatButton:liballoc_string_typo, r=Centril

Fix typo
This commit is contained in:
Guillaume Gomez 2018-12-10 22:02:01 +01:00 committed by GitHub
commit b3f1650b34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2169,7 +2169,7 @@ impl<T: fmt::Display + ?Sized> ToString for T {
use core::fmt::Write; use core::fmt::Write;
let mut buf = String::new(); let mut buf = String::new();
buf.write_fmt(format_args!("{}", self)) buf.write_fmt(format_args!("{}", self))
.expect("a Display implementation return an error unexpectedly"); .expect("a Display implementation returned an error unexpectedly");
buf.shrink_to_fit(); buf.shrink_to_fit();
buf buf
} }