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
1 changed files with 0 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue