diff options
| author | Elias Holzmann <9659253+EliasHolzmann@users.noreply.github.com> | 2023-11-22 23:40:01 +0100 |
|---|---|---|
| committer | Elias Holzmann <9659253+EliasHolzmann@users.noreply.github.com> | 2024-12-05 21:48:35 +0100 |
| commit | ad8f264e46a3420bc90a94b8047d0a6efde497e8 (patch) | |
| tree | dcaa7f6b611cca5fcc456dd9d93a17efc774d5d6 /library/alloc/src/string.rs | |
| parent | 914ab316466e68ad5923640154f15ad5cf622598 (diff) | |
| download | rust-ad8f264e46a3420bc90a94b8047d0a6efde497e8.tar.gz rust-ad8f264e46a3420bc90a94b8047d0a6efde497e8.zip | |
Fixed another broken test
Diffstat (limited to 'library/alloc/src/string.rs')
| -rw-r--r-- | library/alloc/src/string.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index d0d0276c55e..c5378d78d59 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -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"); |
