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.
|
#![no_std]
|
||||||
#![cfg_attr(not(test), no_std)]
|
|
||||||
|
|
||||||
// Import `core` explicitly (it is imported implicitly
|
#[cfg(feature = "std")]
|
||||||
// when `no_std` is enabled, but this does not occur
|
#[macro_use]
|
||||||
// during testing)
|
extern crate std;
|
||||||
#[cfg(test)]
|
|
||||||
extern crate core;
|
|
||||||
|
|
||||||
extern crate byteorder;
|
extern crate byteorder;
|
||||||
extern crate subtle;
|
extern crate subtle;
|
||||||
|
|
Loading…
Reference in New Issue