Skip to content

Commit 87873f8

Browse files
authored
Merge pull request #46 from chrysn-pull-requests/no-std-feature
Unconditionally be no_std and use core
2 parents a875a4c + ca06947 commit 87873f8

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ categories = ["embedded", "no-std", "data-structures"]
1818
[dependencies]
1919

2020
[features]
21-
default = ["std"]
21+
default = []
22+
# This is a no-op feature only provided for compatibility in case it is
23+
# explicitly selected by a user. This crate works without explicit indication
24+
# both on std and no_std systems.
2225
std = []

src/lib.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,10 @@
1212
//! and thus does not use it:
1313
//! an `Option<u7>` still takes up two bytes.
1414
15-
#![cfg_attr(not(feature = "std"), no_std)]
15+
#![no_std]
1616

1717
mod lib {
18-
pub mod core {
19-
#[cfg(not(feature = "std"))]
20-
pub use core::*;
21-
#[cfg(feature = "std")]
22-
pub use std::*;
23-
}
18+
pub use core;
2419
}
2520

2621
mod conversion;

0 commit comments

Comments
 (0)