File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ impl Image {
4848 i as u8
4949 }
5050
51- use png:: HasParameters ;
5251 use std:: fs:: File ;
5352 use std:: io:: BufWriter ;
5453
@@ -60,7 +59,8 @@ impl Image {
6059 self . height as u32 ,
6160 ) ;
6261
63- encoder. set ( png:: ColorType :: RGB ) . set ( png:: BitDepth :: Eight ) ;
62+ encoder. set_color ( png:: ColorType :: RGB ) ;
63+ encoder. set_depth ( png:: BitDepth :: Eight ) ;
6464 let mut writer = encoder. write_header ( ) . unwrap ( ) ;
6565
6666 if soa {
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ pub mod scalar {
6767
6868 pub fn thread_rng ( ) -> RngH {
6969 RngH {
70- rng : THREAD_RNG_KEY . with ( |t| t . clone ( ) ) ,
70+ rng : THREAD_RNG_KEY . with ( Clone :: clone) ,
7171 }
7272 }
7373}
@@ -134,7 +134,7 @@ pub mod vector {
134134
135135 pub fn thread_rng ( ) -> RngH {
136136 RngH {
137- rng : THREAD_RNG_KEY . with ( |t| t . clone ( ) ) ,
137+ rng : THREAD_RNG_KEY . with ( Clone :: clone) ,
138138 }
139139 }
140140}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ fn sum_hor(x: &[f32]) -> f32 {
2323
2424 x. chunks_exact ( f32s:: lanes ( ) )
2525 . map ( f32s:: from_slice_unaligned)
26- . map ( |vec| vec . sum ( ) )
26+ . map ( f32s :: sum)
2727 . sum ( )
2828}
2929
You can’t perform that action at this time.
0 commit comments