File tree 2 files changed +3
-5
lines changed
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
1
import T = inst:: T ;
2
2
import cmp:: { eq, ord} ;
3
- import num:: num;
4
3
5
4
export min_value, max_value;
6
5
export min, max;
@@ -124,7 +123,7 @@ impl eq of eq for T {
124
123
}
125
124
}
126
125
127
- impl num of num for T {
126
+ impl num of num:: num for T {
128
127
fn add ( & & other: T ) -> T { ret self + other; }
129
128
fn sub ( & & other: T ) -> T { ret self - other; }
130
129
fn mul ( & & other: T ) -> T { ret self * other; }
@@ -196,7 +195,7 @@ fn test_to_str() {
196
195
197
196
#[ test]
198
197
fn test_ifaces ( ) {
199
- fn test < U : num > ( ten : U ) {
198
+ fn test < U : num:: num > ( ten : U ) {
200
199
assert ( ten. to_int ( ) == 10 ) ;
201
200
202
201
let two = ten. from_int ( 2 ) ;
Original file line number Diff line number Diff line change 1
1
import T = inst:: T ;
2
2
import cmp:: { eq, ord} ;
3
- import num:: num;
4
3
5
4
export min_value, max_value;
6
5
export min, max;
@@ -65,7 +64,7 @@ impl eq of eq for T {
65
64
}
66
65
}
67
66
68
- impl num of num for T {
67
+ impl num of num:: num for T {
69
68
fn add ( & & other: T ) -> T { ret self + other; }
70
69
fn sub ( & & other: T ) -> T { ret self - other; }
71
70
fn mul ( & & other: T ) -> T { ret self * other; }
You can’t perform that action at this time.
0 commit comments