update some Rust dependencies

I didn't go to quite the latest version of everything, in an effort to
minimize duplicates in the cargo tree.
This commit is contained in:
Scott Lamb
2024-01-06 10:43:20 -08:00
parent 2bcee02ea6
commit 86816e862a
25 changed files with 695 additions and 597 deletions

View File

@@ -25,6 +25,7 @@ use std::ffi::CStr;
use std::fs;
use std::io::{Read, Write};
use std::ops::Range;
use std::os::fd::{AsFd, BorrowedFd};
use std::os::unix::io::{AsRawFd, RawFd};
use std::path::Path;
use std::sync::Arc;
@@ -87,9 +88,9 @@ impl NixPath for CompositeIdPath {
#[derive(Debug)]
pub struct Fd(std::os::unix::io::RawFd);
impl std::os::unix::io::AsRawFd for Fd {
fn as_raw_fd(&self) -> std::os::unix::io::RawFd {
self.0
impl AsFd for Fd {
fn as_fd(&self) -> std::os::unix::prelude::BorrowedFd<'_> {
unsafe { BorrowedFd::borrow_raw(self.0) }
}
}
@@ -316,7 +317,7 @@ impl SampleFileDir {
pub(crate) fn opendir(&self) -> Result<nix::dir::Dir, nix::Error> {
nix::dir::Dir::openat(
self.fd.as_raw_fd(),
self.fd.as_fd().as_raw_fd(),
".",
OFlag::O_DIRECTORY | OFlag::O_RDONLY,
Mode::empty(),

View File

@@ -22,7 +22,6 @@
use std::convert::TryFrom;
use std::future::Future;
use std::os::unix::prelude::AsRawFd;
use std::path::Path;
use std::{
ops::Range,
@@ -352,7 +351,7 @@ impl ReaderInt {
map_len,
nix::sys::mman::ProtFlags::PROT_READ,
nix::sys::mman::MapFlags::MAP_SHARED,
file.as_raw_fd(),
Some(&file),
offset,
)
}