Skip to content

Commit 89a5b39

Browse files
committed
Remove useless extern crate
1 parent 6ba4785 commit 89a5b39

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ Add this to your `Cargo.toml`:
1616
num-integer = "0.1"
1717
```
1818

19-
and this to your crate root:
20-
21-
```rust
22-
extern crate num_integer;
23-
```
24-
2519
## Features
2620

2721
This crate can be used without the standard library (`#![no_std]`) by disabling

src/lib.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@
1616
1717
#![doc(html_root_url = "https://docs.rs/num-integer/0.1")]
1818
#![no_std]
19-
#[cfg(feature = "std")]
20-
extern crate std;
21-
22-
extern crate num_traits as traits;
2319

2420
use core::mem;
2521
use core::ops::Add;
2622

27-
use crate::traits::{Num, Signed, Zero};
23+
use num_traits::{Num, Signed, Zero};
2824

2925
mod roots;
3026
pub use crate::roots::Roots;
@@ -148,8 +144,6 @@ pub trait Integer: Sized + Num + PartialOrd + Ord + Eq {
148144
/// # Examples
149145
///
150146
/// ~~~
151-
/// # extern crate num_integer;
152-
/// # extern crate num_traits;
153147
/// # fn main() {
154148
/// # use num_integer::{ExtendedGcd, Integer};
155149
/// # use num_traits::NumAssign;
@@ -758,9 +752,9 @@ macro_rules! impl_integer_for_isize {
758752

759753
#[test]
760754
fn test_extended_gcd_lcm() {
761-
use crate::traits::NumAssign;
762755
use crate::ExtendedGcd;
763756
use core::fmt::Debug;
757+
use num_traits::NumAssign;
764758

765759
fn check<A: Copy + Debug + Integer + NumAssign>(a: A, b: A) {
766760
let ExtendedGcd { gcd, x, y, .. } = a.extended_gcd(&b);

src/roots.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
use crate::traits::checked_pow;
2-
use crate::traits::PrimInt;
31
use crate::Integer;
42
use core::mem;
3+
use num_traits::{checked_pow, PrimInt};
54

65
/// Provides methods to compute an integer's square root, cube root,
76
/// and arbitrary `n`th root.

0 commit comments

Comments
 (0)