Rename read_usize to read_handle
This commit is contained in:
Родитель
f546fb1c11
Коммит
b1694a9457
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче