Narrow writes device test: the host words through as_chunks, as clippy asks of a constant chunk size
clippy (--cfg m2v_gpu, the M3's job m3-max-7723) refused chunks_exact(4) with a constant size. Verified: the M3's clippy of the runtime reruns next. (cherry picked from commit 7f60624041671d7a0d8d5888003a5555f267f938)
This commit is contained in:
1 parent
4cf73e595c
commit
b98968ca40
1 file changed
+2
-4
@@ -84,10 +84,8 @@ fn fill(host: &Host, texel: u64) -> Vec<u8> {
|
||||
},
|
||||
)
|
||||
.collect();
|
||||
let words: Vec<u32> = bytes
|
||||
.chunks_exact(4)
|
||||
.map(|word| u32::from_le_bytes([word[0], word[1], word[2], word[3]]))
|
||||
.collect();
|
||||
let (words, _) = bytes.as_chunks::<4>();
|
||||
let words: Vec<u32> = words.iter().map(|&word| u32::from_le_bytes(word)).collect();
|
||||
host.set(0, &words);
|
||||
bytes
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user