瀏覽代碼

Fix unused extern crate warning with certain build flags.

Gerd Zellweger 3 年之前
父節點
當前提交
95f7abff90
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/lib.rs

+ 1 - 0
src/lib.rs

@@ -88,6 +88,7 @@ compile_error!("at least one socket needs to be enabled"); */
 #![allow(clippy::option_map_unit_fn)]
 #![allow(clippy::unit_arg)]
 
+#[cfg(any(feature = "std", feature = "alloc"))]
 extern crate alloc;
 
 #[cfg(not(any(feature = "proto-ipv4", feature = "proto-ipv6")))]