File tree Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,6 @@ Add this to your `Cargo.toml`:
16
16
num-integer = " 0.1"
17
17
```
18
18
19
- and this to your crate root:
20
-
21
- ``` rust
22
- extern crate num_integer;
23
- ```
24
-
25
19
## Features
26
20
27
21
This crate can be used without the standard library (` #![no_std] ` ) by disabling
Original file line number Diff line number Diff line change 16
16
17
17
#![ doc( html_root_url = "https://docs.rs/num-integer/0.1" ) ]
18
18
#![ no_std]
19
- #[ cfg( feature = "std" ) ]
20
- extern crate std;
21
-
22
- extern crate num_traits as traits;
23
19
24
20
use core:: mem;
25
21
use core:: ops:: Add ;
26
22
27
- use crate :: traits :: { Num , Signed , Zero } ;
23
+ use num_traits :: { Num , Signed , Zero } ;
28
24
29
25
mod roots;
30
26
pub use crate :: roots:: Roots ;
@@ -148,8 +144,6 @@ pub trait Integer: Sized + Num + PartialOrd + Ord + Eq {
148
144
/// # Examples
149
145
///
150
146
/// ~~~
151
- /// # extern crate num_integer;
152
- /// # extern crate num_traits;
153
147
/// # fn main() {
154
148
/// # use num_integer::{ExtendedGcd, Integer};
155
149
/// # use num_traits::NumAssign;
@@ -758,9 +752,9 @@ macro_rules! impl_integer_for_isize {
758
752
759
753
#[ test]
760
754
fn test_extended_gcd_lcm( ) {
761
- use crate :: traits:: NumAssign ;
762
755
use crate :: ExtendedGcd ;
763
756
use core:: fmt:: Debug ;
757
+ use num_traits:: NumAssign ;
764
758
765
759
fn check<A : Copy + Debug + Integer + NumAssign >( a: A , b: A ) {
766
760
let ExtendedGcd { gcd, x, y, .. } = a. extended_gcd( & b) ;
Original file line number Diff line number Diff line change 1
- use crate :: traits:: checked_pow;
2
- use crate :: traits:: PrimInt ;
3
1
use crate :: Integer ;
4
2
use core:: mem;
3
+ use num_traits:: { checked_pow, PrimInt } ;
5
4
6
5
/// Provides methods to compute an integer's square root, cube root,
7
6
/// and arbitrary `n`th root.
You can’t perform that action at this time.
0 commit comments