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:
Dan Gohman
2021-09-30 08:14:13 -07:00
parent 49767c7379
commit e5ebef1b94
6 changed files with 11 additions and 6 deletions

View File

@@ -297,7 +297,7 @@ pub fn lazy_per_thread_init() -> Result<(), Box<Trap>> {
let ptr = rsix::io::mmap_anonymous(
null_mut(),
alloc_size,
rsix::io::ProtFlags::NONE,
rsix::io::ProtFlags::empty(),
rsix::io::MapFlags::PRIVATE,
)
.map_err(|_| Box::new(Trap::oom()))?;