Remove shrink_to_fit from default ToString::to_string implementation.
Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
This commit is contained in:
parent
ccea570488
commit
0b062887db
@ -2200,7 +2200,6 @@ impl<T: fmt::Display + ?Sized> ToString for T {
|
||||
let mut buf = String::new();
|
||||
buf.write_fmt(format_args!("{}", self))
|
||||
.expect("a Display implementation returned an error unexpectedly");
|
||||
buf.shrink_to_fit();
|
||||
buf
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user