Browse Source

Remove unconditional dependency on alloc

alloc is only required for tests so just make no_std conditional on
tests|"std" instead.
JC 2 years ago
parent
commit
5aaa07aa89
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/lib.rs

+ 1 - 3
src/lib.rs

@@ -111,11 +111,9 @@
 //! [`ufmt`]: https://docs.rs/ufmt/
 //! [`defmt`]: https://defmt.ferrous-systems.com/
 
-#![cfg_attr(not(feature = "std"), no_std)]
+#![cfg_attr(not(any(test, feature = "std")), no_std)]
 #![feature(c_variadic)]
 
-extern crate alloc;
-
 use core::{ffi::*, fmt};
 
 pub mod output;