mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-16 23:42:27 +00:00
Use fixed-size array chunks for RGBA layout inspection
This commit is contained in:
1 parent
fc54b56b65
commit
c0fd5d610a
1 file changed
+1
-1
@@ -578,7 +578,7 @@ fn rgba_component_depth(layout: &[u8]) -> u32 {
|
||||
return 0;
|
||||
}
|
||||
let mut depths = [0u8; 3];
|
||||
for pair in layout.chunks_exact(2) {
|
||||
for pair in layout.as_chunks::<2>().0 {
|
||||
let index = match pair[0] {
|
||||
b'R' => 0,
|
||||
b'G' => 1,
|
||||
|
||||
Reference in new issue
Block a user