Delete io write function

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

View File

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