Browse Source

Always use #![no_std], and declare std when enabled

Josh Stone 7 năm trước cách đây
mục cha
commit
f35cce229e
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/lib.rs

+ 2 - 2
src/lib.rs

@@ -18,9 +18,9 @@
 
 #![deny(unconditional_recursion)]
 
-#![cfg_attr(not(feature = "std"), no_std)]
+#![no_std]
 #[cfg(feature = "std")]
-extern crate core;
+extern crate std;
 
 use core::ops::{Add, Sub, Mul, Div, Rem};
 use core::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};