From 0d90cb07b9afa8d741100483020be79b4acd6409 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Sat, 1 Feb 2020 09:49:54 +0900 Subject: [PATCH] fix: Move `extern crate alloc` to lib.rs --- src/lib.rs | 2 ++ src/utils.rs | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b5a3fff5..05073a2f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -230,6 +230,8 @@ #![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")] #![recursion_limit = "2048"] +extern crate alloc; + #[macro_use] mod utils; diff --git a/src/utils.rs b/src/utils.rs index e257d2f0..f18b74d1 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,7 +1,3 @@ -#[cfg(feature = "alloc")] -extern crate alloc; - -#[cfg(feature = "alloc")] use alloc::string::String; /// Calls a function and aborts if it panics.