File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 6
6
7
7
use std:: collections:: HashMap ;
8
8
use std:: env;
9
- use std:: hint:: black_box;
10
9
use std:: time:: { Duration , Instant } ;
11
10
12
11
const CAPACITY : usize = 1 ;
@@ -19,7 +18,7 @@ macro_rules! eval {
19
18
let _ = $map. insert( 0 , 42 ) ;
20
19
for i in 1 ..$capacity - 1 {
21
20
let _ = $map. insert( i as u32 , i as i64 ) ;
22
- let v = black_box( * $map. get( & ( i as u32 ) ) . unwrap( ) ) ;
21
+ let v = std :: hint :: black_box( * $map. get( & ( i as u32 ) ) . unwrap( ) ) ;
23
22
assert_eq!( v, i as i64 ) ;
24
23
}
25
24
for i in 1 ..$capacity - 1 {
@@ -30,9 +29,9 @@ macro_rules! eval {
30
29
if $map. iter( ) . find( |( _k, v) | * * v == 0 ) . is_some( ) {
31
30
$map. clear( ) ;
32
31
}
33
- sum += black_box( $map. iter( ) . find( |( _k, v) | * * v == 42 ) . unwrap( ) . 1 ) ;
32
+ sum += std :: hint :: black_box( $map. iter( ) . find( |( _k, v) | * * v == 42 ) . unwrap( ) . 1 ) ;
34
33
}
35
- black_box( sum)
34
+ std :: hint :: black_box( sum)
36
35
} } ;
37
36
}
38
37
You can’t perform that action at this time.
0 commit comments