Update all dependencies
This commit is contained in:
@ -7,13 +7,13 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
clap = "3"
|
||||
env_logger = "0.9"
|
||||
clap = "4"
|
||||
env_logger = "0.11"
|
||||
humantime = "2"
|
||||
lazy_static = "1"
|
||||
libc = "0.2"
|
||||
shell-words = "1"
|
||||
toml = "0.5"
|
||||
toml = "0.8"
|
||||
xcb = "1"
|
||||
xdg = "2"
|
||||
zbus = "3"
|
||||
zbus = "4"
|
||||
|
@ -1,4 +1,4 @@
|
||||
use std::{ffi::CStr, io};
|
||||
use std::{ffi::CStr, io, os::fd::{BorrowedFd, RawFd}};
|
||||
use xcb::x;
|
||||
|
||||
pub mod desktop;
|
||||
@ -77,3 +77,10 @@ pub fn get_username() -> io::Result<String> {
|
||||
.map(|s| s.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn borrow_raw_fd<'a>(fd: RawFd) -> BorrowedFd<'a> {
|
||||
if fd < 0 {
|
||||
panic!("Can't borrow invalid file descriptor");
|
||||
}
|
||||
unsafe { BorrowedFd::borrow_raw(fd) }
|
||||
}
|
||||
|
Reference in New Issue
Block a user