Drop std feature

This commit is contained in:
David Tolnay 2021-12-11 21:08:32 -08:00
parent f90632b9db
commit 58e20ae3f3
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 3 additions and 12 deletions

View File

@ -12,9 +12,5 @@ readme = "README.md"
exclude = ["performance.png"] exclude = ["performance.png"]
edition = "2018" edition = "2018"
[features]
default = ["std"]
std = []
[package.metadata.docs.rs] [package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"] targets = ["x86_64-unknown-linux-gnu"]

View File

@ -38,7 +38,7 @@
//! ``` //! ```
#![doc(html_root_url = "https://docs.rs/itoa/0.4.8")] #![doc(html_root_url = "https://docs.rs/itoa/0.4.8")]
#![cfg_attr(not(feature = "std"), no_std)] #![no_std]
#![allow( #![allow(
clippy::cast_lossless, clippy::cast_lossless,
clippy::cast_possible_truncation, clippy::cast_possible_truncation,
@ -52,13 +52,8 @@
mod udiv128; mod udiv128;
#[cfg(feature = "std")] use core::mem::{self, MaybeUninit};
use std::{mem, ptr, slice, str}; use core::{ptr, slice, str};
#[cfg(not(feature = "std"))]
use core::{mem, ptr, slice, str};
use self::mem::MaybeUninit;
/// A safe API for formatting integers to text. /// A safe API for formatting integers to text.
/// ///