From 58e20ae3f341afe8c85b43c03956cb6fc78ef930 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 11 Dec 2021 21:08:32 -0800 Subject: [PATCH] Drop std feature --- Cargo.toml | 4 ---- src/lib.rs | 11 +++-------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 39409e5..5c48d0a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,9 +12,5 @@ readme = "README.md" exclude = ["performance.png"] edition = "2018" -[features] -default = ["std"] -std = [] - [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/src/lib.rs b/src/lib.rs index d71a9be..fe87354 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,7 @@ //! ``` #![doc(html_root_url = "https://docs.rs/itoa/0.4.8")] -#![cfg_attr(not(feature = "std"), no_std)] +#![no_std] #![allow( clippy::cast_lossless, clippy::cast_possible_truncation, @@ -52,13 +52,8 @@ mod udiv128; -#[cfg(feature = "std")] -use std::{mem, ptr, slice, str}; - -#[cfg(not(feature = "std"))] -use core::{mem, ptr, slice, str}; - -use self::mem::MaybeUninit; +use core::mem::{self, MaybeUninit}; +use core::{ptr, slice, str}; /// A safe API for formatting integers to text. ///