aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index a57ebfd..e4fddfe 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -39,15 +39,20 @@ assert_eq!(wtr, vec![5, 2, 0, 3]);
#![crate_name = "byteorder"]
#![doc(html_root_url = "http://burntsushi.net/rustdoc/byteorder")]
+#![cfg_attr(not(feature = "std"), no_std)]
+
#![deny(missing_docs)]
-use std::mem::transmute;
-use std::ptr::copy_nonoverlapping;
+#[cfg(feature = "std")]
+extern crate core;
+
+use core::mem::transmute;
+use core::ptr::copy_nonoverlapping;
-#[cfg(not(feature = "no-std"))]
+#[cfg(feature = "std")]
pub use new::{ReadBytesExt, WriteBytesExt};
-#[cfg(not(feature = "no-std"))]
+#[cfg(feature = "std")]
mod new;
#[inline]