Skip to content

Commit

Permalink
Remove shrink_to_fit from default ToString::to_string implementation.
Browse files Browse the repository at this point in the history
Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
  • Loading branch information
m-ou-se and scottmcm committed Oct 16, 2020
1 parent ccea570 commit 0b06288
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion library/alloc/src/string.rs
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 0b06288

Please sign in to comment.