2020-03-18 03:50:51 +01:00
|
|
|
//! Helper module which defines most of the needed features from `std` for `no-std` builds.
|
|
|
|
|
2020-03-18 05:04:26 +01:00
|
|
|
#[cfg(feature = "no_std")]
|
2020-03-17 19:26:11 +01:00
|
|
|
mod inner {
|
|
|
|
pub use core::{
|
|
|
|
any, arch, array, ascii, cell, char, clone, cmp, convert, default, f32, f64, ffi, fmt,
|
2020-06-17 10:50:46 +02:00
|
|
|
future, hash, hint, i16, i32, i64, i8, isize, iter, marker, mem, num, ops, option, panic,
|
|
|
|
pin, prelude, ptr, result, slice, str, task, time, u16, u32, u64, u8, usize,
|
2020-03-17 19:26:11 +01:00
|
|
|
};
|
|
|
|
|
2020-06-17 10:50:46 +02:00
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
|
|
pub use core::{i128, u128};
|
|
|
|
|
2020-04-15 16:21:23 +02:00
|
|
|
pub use alloc::{borrow, boxed, format, rc, string, sync, vec};
|
2020-03-17 19:26:11 +01:00
|
|
|
|
|
|
|
pub use core_error as error;
|
|
|
|
|
|
|
|
pub mod collections {
|
2020-10-15 16:11:40 +02:00
|
|
|
pub use hashbrown::{hash_map, hash_set, HashMap, HashSet};
|
2020-03-17 19:26:11 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-18 05:04:26 +01:00
|
|
|
#[cfg(not(feature = "no_std"))]
|
2020-03-17 19:26:11 +01:00
|
|
|
mod inner {
|
|
|
|
pub use std::*;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub use self::inner::*;
|