Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/linux/mem_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl MemReader {
pub fn read_to_vec(
&mut self,
src: usize,
length: std::num::NonZero<usize>,
length: std::num::NonZeroUsize,
) -> Result<Vec<u8>, CopyFromProcessError> {
let length = length.into();
let layout =
Expand Down Expand Up @@ -258,7 +258,7 @@ impl PtraceDumper {
src: usize,
length: usize,
) -> Result<Vec<u8>, crate::errors::DumperError> {
let length = std::num::NonZero::new(length).ok_or_else(|| {
let length = std::num::NonZeroUsize::new(length).ok_or_else(|| {
crate::errors::DumperError::CopyFromProcessError(CopyFromProcessError {
src,
child: pid,
Expand Down
2 changes: 1 addition & 1 deletion src/linux/module_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<'buf> ProcessMemory<'buf> {
match self {
Self::Process(pr) => {
let error = |e| error(Some(pr.start_address), e);
let len = std::num::NonZero::new(length as usize)
let len = std::num::NonZeroUsize::new(length as usize)
.ok_or_else(|| error(nix::Error::EINVAL))?;
let proc_offset = pr
.start_address
Expand Down