kept_padding: the Managed test's words by as_chunks
clippy's chunks_exact_to_as_chunks denied the constant-size chunks_exact in the Managed test's host words (m3-max-20244's clippy leg). The words are the same. Verified: m3-max-20244 (lavapipe on msi, at 602a8bcc3e) ran the runtime filter (248 passed, the three kept_padding tests among them), the validation filter (332 passed, the heap_layouts lane among them) and api_signatures/api_surface (15 passed); only this lint failed.
This commit is contained in:
1 parent
946ee6e0b6
commit
afff0e6cfe
1 file changed
+5
-2
@@ -304,8 +304,11 @@ fn a_managed_texture_changed_in_one_row_reads_it_in_place_where_a_shared_one_cop
|
||||
};
|
||||
let length = pitch * HEIGHT;
|
||||
let written = named(length, 7);
|
||||
let words: Vec<u32> = (written.chunks_exact(4))
|
||||
.map(|word| u32::from_le_bytes(word.try_into().unwrap()))
|
||||
let words: Vec<u32> = written
|
||||
.as_chunks::<4>()
|
||||
.0
|
||||
.iter()
|
||||
.map(|&word| u32::from_le_bytes(word))
|
||||
.collect();
|
||||
host.set(0, &words);
|
||||
// SAFETY: as above.
|
||||
|
||||
Reference in new issue
Block a user