Use empty() instead of NONE with rsix flags types.
`empty()` is provided by all `bitflags` types, so it's more idiomatic than having `NONE` values.
This commit is contained in:
@@ -60,7 +60,12 @@ mod tests {
|
||||
|
||||
// So we can later trigger SIGSEGV by performing a read
|
||||
unsafe {
|
||||
mprotect(base as *mut std::ffi::c_void, length, MprotectFlags::NONE).unwrap();
|
||||
mprotect(
|
||||
base as *mut std::ffi::c_void,
|
||||
length,
|
||||
MprotectFlags::empty(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
println!("memory: base={:?}, length={}", base, length);
|
||||
|
||||
Reference in New Issue
Block a user