make Error enum variants clearer

This commit is contained in:
2024-12-31 08:42:28 +00:00
parent e3f6613c6d
commit 84ada5576f
5 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -35,13 +35,13 @@ impl Handle {
OpenProcess(PROCESS_ALL_ACCESS, false, pid)
.or_else(|_| OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE, false, pid))
.map_err(|why| {
crate::Error::HandleError(format!(
crate::Error::ObtainHandleError(format!(
"failed to open process with needed access: {why}",
))
})?
};
if handle == INVALID_HANDLE_VALUE {
return Err(crate::Error::HandleError(
return Err(crate::Error::ObtainHandleError(
"failed to get a valid handle".to_string(),
));
}