Skip to content

Commit

Permalink
Improve feature granularity in maybestd to fix warns
Browse files Browse the repository at this point in the history
  • Loading branch information
preston-evans98 committed Apr 25, 2024
1 parent ca8e776 commit 2b5e18b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ extern crate alloc;

mod maybestd {
#[cfg(not(feature = "std"))]
pub use alloc::{boxed, collections, format, string, vec};
pub use alloc::{boxed, vec};
#[cfg(all(not(feature = "std"), feature = "serde"))]
pub use alloc::{format, string};
#[cfg(not(feature = "std"))]
pub use core::{cmp, fmt, hash, marker, mem, ops};
#[cfg(feature = "std")]
pub use std::{boxed, cmp, fmt, hash, marker, mem, ops, vec};
#[cfg(all(feature = "std", feature = "serde"))]
pub use std::{format, string};

pub mod hash_or_btree_map {
#[cfg(not(feature = "std"))]
Expand Down

0 comments on commit 2b5e18b

Please sign in to comment.