@@ -56,8 +56,8 @@ impl Game {
5656 // https://github.com/rust-windowing/softbuffer/issues/177
5757 let scale_factor = scale_factor * 4.0 ;
5858
59- let width = buffer. width ( ) . get ( ) as f32 / scale_factor;
60- let height = buffer. height ( ) . get ( ) as f32 / scale_factor;
59+ let width = buffer. width ( ) as f32 / scale_factor;
60+ let height = buffer. height ( ) as f32 / scale_factor;
6161
6262 let dist_to_focus = 10.0 ;
6363 let aperture = 0.1 ;
@@ -108,7 +108,7 @@ impl Game {
108108 }
109109
110110 // Upscale by `scale_factor`.
111- let width = buffer. width ( ) . get ( ) as usize ;
111+ let width = buffer. width ( ) as usize ;
112112 buffer. iter_mut ( ) . enumerate ( ) . for_each ( |( i, pixel) | {
113113 let y = i % width;
114114 let x = i / width;
@@ -130,8 +130,8 @@ impl Game {
130130 color : u32 ,
131131 }
132132
133- let width = buffer. width ( ) . get ( ) as f32 / scale_factor;
134- let height = buffer. height ( ) . get ( ) as f32 / scale_factor;
133+ let width = buffer. width ( ) as f32 / scale_factor;
134+ let height = buffer. height ( ) as f32 / scale_factor;
135135 let rects = & [
136136 Rect {
137137 left : 10.0 ,
@@ -149,7 +149,7 @@ impl Game {
149149 } ,
150150 ] ;
151151
152- let width = buffer. width ( ) . get ( ) ;
152+ let width = buffer. width ( ) ;
153153 for ( y, row) in buffer. chunks_exact_mut ( width as usize ) . enumerate ( ) {
154154 for rect in rects {
155155 let rect_vertical =
0 commit comments