From 1fb52089715631f4edb2abdc592547d0f5121161 Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Mon, 4 Dec 2023 01:28:08 +0100 Subject: chore: ensure everything still runs on no_std Signed-off-by: Henry Gressmann --- crates/parser/src/lib.rs | 3 +-- crates/parser/src/std.rs | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 crates/parser/src/std.rs (limited to 'crates/parser/src') diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs index d91694b..3cc51d6 100644 --- a/crates/parser/src/lib.rs +++ b/crates/parser/src/lib.rs @@ -2,9 +2,8 @@ #![forbid(unsafe_code)] #![cfg_attr(not(feature = "std"), feature(error_in_core))] +mod std; extern crate alloc; -#[cfg(feature = "std")] -extern crate std; mod conversion; mod error; diff --git a/crates/parser/src/std.rs b/crates/parser/src/std.rs new file mode 100644 index 0000000..67152be --- /dev/null +++ b/crates/parser/src/std.rs @@ -0,0 +1,5 @@ +#[cfg(feature = "std")] +extern crate std; + +#[cfg(feature = "std")] +pub use std::*; -- cgit v1.3.1