Skip to content

Commit 2f8f689

Browse files
committed
Update rustix to 1.x
We have both in the dependency tree now, so may as well update here.
1 parent d62ff01 commit 2f8f689

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ itertools = "0.14.0"
3131
log = "0.4.20"
3232
i18n-embed-fl = "0.9.0"
3333
rust-embed = "8.1.0"
34-
rustix = { version = "0.38.30", features = ["fs"] }
34+
rustix = { version = "1.0.7", features = ["fs", "shm"] }
3535
calloop-wayland-source = "0.4.0"
3636
aliasable = "0.1.3"
3737
futures-executor = { version = "0.3.31", features = ["thread-pool"] }

src/utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustix::{io::Errno, shm::ShmOFlags};
1+
use rustix::{io::Errno, shm};
22
use std::{
33
os::fd::OwnedFd,
44
time::{SystemTime, UNIX_EPOCH},
@@ -26,16 +26,16 @@ pub fn create_memfile() -> rustix::io::Result<OwnedFd> {
2626
}
2727

2828
loop {
29-
let flags = ShmOFlags::CREATE | ShmOFlags::EXCL | ShmOFlags::RDWR;
29+
let flags = shm::OFlags::CREATE | shm::OFlags::EXCL | shm::OFlags::RDWR;
3030

3131
let time = SystemTime::now();
3232
let name = format!(
3333
"/cosmic-workspaces-shm-{}",
3434
time.duration_since(UNIX_EPOCH).unwrap().subsec_nanos()
3535
);
3636

37-
match rustix::shm::shm_open(&name, flags, 0o600.into()) {
38-
Ok(fd) => match rustix::shm::shm_unlink(&name) {
37+
match shm::open(&name, flags, 0o600.into()) {
38+
Ok(fd) => match shm::unlink(&name) {
3939
Ok(_) => return Ok(fd),
4040
Err(errno) => {
4141
return Err(errno);

0 commit comments

Comments
 (0)