File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ fn get_nstime() -> u64 {
56
56
dur.as_secs() << 30 | dur.subsec_nanos() as u64
57
57
}
58
58
59
- fn main() -> Result<(), Box<Error>> {
59
+ fn main() -> Result<(), Box<dyn Error>> {
60
60
let mut rng = JitterRng::new_with_timer(get_nstime);
61
61
62
62
// 1_000_000 results are required for the
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ mod tests {
182
182
183
183
#[ test]
184
184
fn test_misc ( ) {
185
- let rng: & mut RngCore = & mut :: test:: rng ( 820 ) ;
185
+ let rng: & mut dyn RngCore = & mut :: test:: rng ( 820 ) ;
186
186
187
187
rng. sample :: < char , _ > ( Standard ) ;
188
188
rng. sample :: < bool , _ > ( Standard ) ;
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ impl ::std::error::Error for WeightedError {
225
225
fn description ( & self ) -> & str {
226
226
self . msg ( )
227
227
}
228
- fn cause ( & self ) -> Option < & :: std:: error:: Error > {
228
+ fn cause ( & self ) -> Option < & dyn ( :: std:: error:: Error ) > {
229
229
None
230
230
}
231
231
}
Original file line number Diff line number Diff line change @@ -649,7 +649,7 @@ mod test {
649
649
fn test_rng_trait_object ( ) {
650
650
use distributions:: { Distribution , Standard } ;
651
651
let mut rng = rng ( 109 ) ;
652
- let mut r = & mut rng as & mut RngCore ;
652
+ let mut r = & mut rng as & mut dyn RngCore ;
653
653
r. next_u32 ( ) ;
654
654
r. gen :: < i32 > ( ) ;
655
655
assert_eq ! ( r. gen_range( 0 , 1 ) , 0 ) ;
@@ -661,7 +661,7 @@ mod test {
661
661
fn test_rng_boxed_trait ( ) {
662
662
use distributions:: { Distribution , Standard } ;
663
663
let rng = rng ( 110 ) ;
664
- let mut r = Box :: new ( rng) as Box < RngCore > ;
664
+ let mut r = Box :: new ( rng) as Box < dyn RngCore > ;
665
665
r. next_u32 ( ) ;
666
666
r. gen :: < i32 > ( ) ;
667
667
assert_eq ! ( r. gen_range( 0 , 1 ) , 0 ) ;
You can’t perform that action at this time.
0 commit comments