Fixed another broken test
This commit is contained in:
parent
914ab31646
commit
ad8f264e46
1 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,6 @@
|
|||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
use core::error::Error;
|
||||
use core::fmt::FormattingOptions;
|
||||
use core::iter::FusedIterator;
|
||||
#[cfg(not(no_global_oom_handling))]
|
||||
use core::iter::from_fn;
|
||||
|
@ -2683,7 +2682,8 @@ impl<T: fmt::Display + ?Sized> ToString for T {
|
|||
#[inline]
|
||||
default fn to_string(&self) -> String {
|
||||
let mut buf = String::new();
|
||||
let mut formatter = core::fmt::Formatter::new(&mut buf, FormattingOptions::new());
|
||||
let mut formatter =
|
||||
core::fmt::Formatter::new(&mut buf, core::fmt::FormattingOptions::new());
|
||||
// Bypass format_args!() to avoid write_str with zero-length strs
|
||||
fmt::Display::fmt(self, &mut formatter)
|
||||
.expect("a Display implementation returned an error unexpectedly");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue