1
Fork 0

Fixed another broken test

This commit is contained in:
Elias Holzmann 2023-11-22 23:40:01 +01:00
parent 914ab31646
commit ad8f264e46

View file

@ -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");