Rename read_usize to read_handle

This commit is contained in:
HoLLy 2020-11-15 15:47:44 +01:00
Родитель f546fb1c11
Коммит b1694a9457
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -32,7 +32,7 @@ pub enum Architecture {
}
// NOTE: all handles seem to be 32-bit
pub fn read_usize(buf: &mut dyn Buf) -> usize {
pub fn read_handle(buf: &mut dyn Buf) -> usize {
match std::mem::size_of::<usize>() {
4 | 8 => buf.get_u32_le() as usize,
_ => unreachable!(),

Просмотреть файл

@ -42,7 +42,7 @@ impl CERequest for Process32FirstRequest {
fn read(buf: &mut dyn Buf) -> Self {
Self {
handle: read_usize(buf),
handle: read_handle(buf),
}
}
}
@ -59,7 +59,7 @@ impl CERequest for Process32NextRequest {
fn read(buf: &mut dyn Buf) -> Self {
Self {
handle: read_usize(buf),
handle: read_handle(buf),
}
}
}
@ -76,7 +76,7 @@ impl CERequest for CloseHandleRequest {
fn read(buf: &mut dyn Buf) -> Self {
Self {
handle: read_usize(buf),
handle: read_handle(buf),
}
}
}
@ -93,7 +93,7 @@ impl CERequest for Module32FirstRequest {
fn read(buf: &mut dyn Buf) -> Self {
Self {
handle: read_usize(buf),
handle: read_handle(buf),
}
}
}
@ -110,7 +110,7 @@ impl CERequest for Module32NextRequest {
fn read(buf: &mut dyn Buf) -> Self {
Self {
handle: read_usize(buf),
handle: read_handle(buf),
}
}
}