Skip to content

Commit 1010ba9

Browse files
committed
Remove useless extern crate
1 parent f3383ea commit 1010ba9

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@
1717
#![doc(html_root_url = "https://docs.rs/num-traits/0.2")]
1818
#![deny(unconditional_recursion)]
1919
#![no_std]
20+
21+
// Need to explicitly bring the crate in for inherent float methods
2022
#[cfg(feature = "std")]
2123
extern crate std;
2224

23-
// Only `no_std` builds actually use `libm`.
24-
#[cfg(all(not(feature = "std"), feature = "libm"))]
25-
extern crate libm;
26-
2725
use core::fmt;
2826
use core::num::Wrapping;
2927
use core::ops::{Add, Div, Mul, Rem, Sub};

tests/cast.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
//! Tests of `num_traits::cast`.
22
3-
#![no_std]
4-
5-
#[cfg(feature = "std")]
6-
#[macro_use]
7-
extern crate std;
3+
#![cfg_attr(not(feature = "std"), no_std)]
84

95
use num_traits::cast::*;
106
use num_traits::Bounded;

0 commit comments

Comments
 (0)