Update rustix to 1.x

We have both in the dependency tree now, so may as well update here.
This commit is contained in:
Ian Douglas Scott 2025-06-12 12:41:28 -07:00 committed by Ian Douglas Scott
parent d62ff0101d
commit 2f8f689cfd
3 changed files with 6 additions and 6 deletions

2
Cargo.lock generated
View file

@ -1224,7 +1224,7 @@ dependencies = [
"log",
"memmap2 0.9.5",
"rust-embed",
"rustix 0.38.44",
"rustix 1.0.7",
"tokio",
"wayland-protocols",
]

View file

@ -31,7 +31,7 @@ itertools = "0.14.0"
log = "0.4.20"
i18n-embed-fl = "0.9.0"
rust-embed = "8.1.0"
rustix = { version = "0.38.30", features = ["fs"] }
rustix = { version = "1.0.7", features = ["fs", "shm"] }
calloop-wayland-source = "0.4.0"
aliasable = "0.1.3"
futures-executor = { version = "0.3.31", features = ["thread-pool"] }

View file

@ -1,4 +1,4 @@
use rustix::{io::Errno, shm::ShmOFlags};
use rustix::{io::Errno, shm};
use std::{
os::fd::OwnedFd,
time::{SystemTime, UNIX_EPOCH},
@ -26,7 +26,7 @@ pub fn create_memfile() -> rustix::io::Result<OwnedFd> {
}
loop {
let flags = ShmOFlags::CREATE | ShmOFlags::EXCL | ShmOFlags::RDWR;
let flags = shm::OFlags::CREATE | shm::OFlags::EXCL | shm::OFlags::RDWR;
let time = SystemTime::now();
let name = format!(
@ -34,8 +34,8 @@ pub fn create_memfile() -> rustix::io::Result<OwnedFd> {
time.duration_since(UNIX_EPOCH).unwrap().subsec_nanos()
);
match rustix::shm::shm_open(&name, flags, 0o600.into()) {
Ok(fd) => match rustix::shm::shm_unlink(&name) {
match shm::open(&name, flags, 0o600.into()) {
Ok(fd) => match shm::unlink(&name) {
Ok(_) => return Ok(fd),
Err(errno) => {
return Err(errno);