소스 검색

Fix unused extern crate warning with certain build flags.

Gerd Zellweger 4 년 전
부모
커밋
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")))]