Do more sensible things when `std` feature is enabled/disabled.
This commit is contained in:
parent
c8128b692d
commit
39eda03c74
11
src/lib.rs
11
src/lib.rs
|
@ -1,11 +1,8 @@
|
|||
// This crate is `no_std` unless test mode is enabled.
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
#![no_std]
|
||||
|
||||
// Import `core` explicitly (it is imported implicitly
|
||||
// when `no_std` is enabled, but this does not occur
|
||||
// during testing)
|
||||
#[cfg(test)]
|
||||
extern crate core;
|
||||
#[cfg(feature = "std")]
|
||||
#[macro_use]
|
||||
extern crate std;
|
||||
|
||||
extern crate byteorder;
|
||||
extern crate subtle;
|
||||
|
|
Loading…
Reference in New Issue