Delete fmt function

This commit is contained in:
David Tolnay 2021-12-11 21:07:14 -08:00
parent 42cb96a975
commit 9cf53f1083
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
1 changed files with 2 additions and 9 deletions

View File

@ -53,10 +53,10 @@
mod udiv128;
#[cfg(feature = "std")]
use std::{fmt, io, mem, ptr, slice, str};
use std::{io, mem, ptr, slice, str};
#[cfg(not(feature = "std"))]
use core::{fmt, mem, ptr, slice, str};
use core::{mem, ptr, slice, str};
use self::mem::MaybeUninit;
@ -72,13 +72,6 @@ pub fn write<W: io::Write, V: Integer>(mut wr: W, value: V) -> io::Result<usize>
}
}
/// Write integer to an `fmt::Write`.
#[inline]
pub fn fmt<W: fmt::Write, V: Integer>(mut wr: W, value: V) -> fmt::Result {
let mut buf = Buffer::new();
wr.write_str(buf.format(value))
}
/// A safe API for formatting integers to text.
///
/// # Example