File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ impl Image {
48
48
i as u8
49
49
}
50
50
51
- use png:: HasParameters ;
52
51
use std:: fs:: File ;
53
52
use std:: io:: BufWriter ;
54
53
@@ -60,7 +59,8 @@ impl Image {
60
59
self . height as u32 ,
61
60
) ;
62
61
63
- encoder. set ( png:: ColorType :: RGB ) . set ( png:: BitDepth :: Eight ) ;
62
+ encoder. set_color ( png:: ColorType :: RGB ) ;
63
+ encoder. set_depth ( png:: BitDepth :: Eight ) ;
64
64
let mut writer = encoder. write_header ( ) . unwrap ( ) ;
65
65
66
66
if soa {
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ pub mod scalar {
67
67
68
68
pub fn thread_rng ( ) -> RngH {
69
69
RngH {
70
- rng : THREAD_RNG_KEY . with ( |t| t . clone ( ) ) ,
70
+ rng : THREAD_RNG_KEY . with ( Clone :: clone) ,
71
71
}
72
72
}
73
73
}
@@ -134,7 +134,7 @@ pub mod vector {
134
134
135
135
pub fn thread_rng ( ) -> RngH {
136
136
RngH {
137
- rng : THREAD_RNG_KEY . with ( |t| t . clone ( ) ) ,
137
+ rng : THREAD_RNG_KEY . with ( Clone :: clone) ,
138
138
}
139
139
}
140
140
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ fn sum_hor(x: &[f32]) -> f32 {
23
23
24
24
x. chunks_exact ( f32s:: lanes ( ) )
25
25
. map ( f32s:: from_slice_unaligned)
26
- . map ( |vec| vec . sum ( ) )
26
+ . map ( f32s :: sum)
27
27
. sum ( )
28
28
}
29
29
You can’t perform that action at this time.
0 commit comments