8000 Fix clippy lint broken with new Rust release by marti4d · Pull Request #213 · rust-minidump/minidump-writer · GitHub
[go: up one dir, main page]

Skip to content
8000
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/linux/minidump_writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,11 +883,11 @@ impl MinidumpWriter {
for x in &mut stack_copy[0..offset] {
*x = 0;
}
let mut chunks = stack_copy[offset..].chunks_exact_mut(std::mem::size_of::<usize>());
let (chunks, remainder) = stack_copy[offset..].as_chunks_mut::<{ size_of::<usize>() }>();

// Apply sanitization to each complete pointer-aligned word in the
// stack.
for sp in &mut chunks {
for sp in chunks {
let addr = usize::from_ne_bytes(sp.to_vec().as_slice().try_into()?);
let addr_signed = isize::from_ne_bytes(sp.to_vec().as_slice().try_into()?);

Expand Down Expand Up @@ -918,7 +918,7 @@ impl MinidumpWriter {
}
// Zero any partial word at the top of the stack, if alignment is
// such that that is required.
for sp in chunks.into_remainder() {
for sp in remainder {
*sp = 0;
}
Ok(())
Expand Down
Loading
0