@@ -147,18 +147,22 @@ unsafe fn fix_opaque_skin(skin: &mut DynamicImage, original_format: SkinFormat)
147147 ] ;
148148
149149 for & region in & REQUIRED_REGIONS {
150- unsafe { unsafe_fill_rect ( skin, region, transparent) ; }
150+ unsafe {
151+ unsafe_fill_rect ( skin, region, transparent) ;
152+ }
151153 }
152154
153155 if matches ! ( original_format, SkinFormat :: Modern ) {
154156 for & region in & REQUIRED_REGIONS_MODERN {
155- unsafe { unsafe_fill_rect ( skin, region, transparent) ; }
157+ unsafe {
158+ unsafe_fill_rect ( skin, region, transparent) ;
159+ }
156160 }
157161 }
158162}
159163
160164unsafe fn fix_transparent_skin ( skin : & mut DynamicImage ) {
161- unsafe {
165+ unsafe {
162166 unsafe_remove_transparency ( skin, rect ! ( 0 , 8 , 32 , 8 ) ) ;
163167 unsafe_remove_transparency ( skin, rect ! ( 8 , 0 , 16 , 8 ) ) ;
164168 unsafe_remove_transparency ( skin, rect ! ( 0 , 20 , 56 , 12 ) ) ;
@@ -174,7 +178,9 @@ unsafe fn fix_transparent_skin(skin: &mut DynamicImage) {
174178unsafe fn unsafe_fill_rect ( image : & mut DynamicImage , rect : Rect , pixel : Rgba < u8 > ) {
175179 for x in rect. x ..rect. x + rect. width {
176180 for y in rect. y ..rect. y + rect. height {
177- unsafe { image. unsafe_put_pixel ( x, y, pixel) ; }
181+ unsafe {
182+ image. unsafe_put_pixel ( x, y, pixel) ;
183+ }
178184 }
179185 }
180186}
@@ -196,7 +202,9 @@ unsafe fn unsafe_remove_transparency(image: &mut DynamicImage, rect: Rect) {
196202 pixel[ 2 ] = ( opacity * pixel[ 2 ] as f32 ) as u8 ;
197203 pixel[ 3 ] = 255 ;
198204
199- unsafe { image. unsafe_put_pixel ( x, y, pixel) ; }
205+ unsafe {
206+ image. unsafe_put_pixel ( x, y, pixel) ;
207+ }
200208 }
201209 }
202210}
0 commit comments