Code cleanup

This commit is contained in:
Emil Ernerfeldt
2020-11-20 20:32:38 +01:00
parent ebf204a9ae
commit 99a2a52510
4 changed files with 167 additions and 137 deletions
+1 -2
View File
@@ -234,8 +234,7 @@ impl Painter {
}
let mut pixels: Vec<u8> = Vec::with_capacity(texture.pixels.len() * 4);
for &alpha in &texture.pixels {
let srgba = Srgba::white_alpha(alpha);
for srgba in texture.srgba_pixels() {
pixels.push(srgba.r());
pixels.push(srgba.g());
pixels.push(srgba.b());