Bump to cap-std 0.25 and io-lifetimes 0.7
Prep for bumping ostree-rs-ext, which will help bump rpm-ostree, which will get it out of having two copies of rustix.
This commit is contained in:
parent
b87c8a8e23
commit
63499747b9
|
|
@ -38,8 +38,8 @@ members = [".", "rust-bindings/sys"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "1.2.1"
|
bitflags = "1.2.1"
|
||||||
cap-std = { version = "0.24", optional = true}
|
cap-std = { version = "0.25", optional = true}
|
||||||
io-lifetimes = { version = "0.5", optional = true}
|
io-lifetimes = { version = "0.7", optional = true}
|
||||||
ffi = { package = "ostree-sys", path = "rust-bindings/sys", version = "0.10.0" }
|
ffi = { package = "ostree-sys", path = "rust-bindings/sys", version = "0.10.0" }
|
||||||
gio = "0.14"
|
gio = "0.14"
|
||||||
glib = "0.14.4"
|
glib = "0.14.4"
|
||||||
|
|
@ -53,7 +53,7 @@ thiserror = "1.0.20"
|
||||||
maplit = "1.0.2"
|
maplit = "1.0.2"
|
||||||
openat = "0.1.19"
|
openat = "0.1.19"
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
cap-tempfile = "0.24"
|
cap-tempfile = "0.25"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cap-std-apis = ["cap-std", "io-lifetimes", "v2017_10"]
|
cap-std-apis = ["cap-std", "io-lifetimes", "v2017_10"]
|
||||||
|
|
|
||||||
|
|
@ -154,13 +154,15 @@ impl Repo {
|
||||||
/// Borrow the directory file descriptor for this repository.
|
/// Borrow the directory file descriptor for this repository.
|
||||||
#[cfg(feature = "cap-std-apis")]
|
#[cfg(feature = "cap-std-apis")]
|
||||||
pub fn dfd_borrow(&self) -> io_lifetimes::BorrowedFd {
|
pub fn dfd_borrow(&self) -> io_lifetimes::BorrowedFd {
|
||||||
unsafe { io_lifetimes::BorrowedFd::borrow_raw_fd(self.dfd()) }
|
unsafe { io_lifetimes::BorrowedFd::borrow_raw(self.dfd()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return a new `cap-std` directory reference for this repository.
|
/// Return a new `cap-std` directory reference for this repository.
|
||||||
#[cfg(feature = "cap-std-apis")]
|
#[cfg(feature = "cap-std-apis")]
|
||||||
pub fn dfd_as_dir(&self) -> std::io::Result<cap_std::fs::Dir> {
|
pub fn dfd_as_dir(&self) -> std::io::Result<cap_std::fs::Dir> {
|
||||||
cap_std::fs::Dir::reopen_dir(&self.dfd_borrow())
|
use io_lifetimes::AsFd;
|
||||||
|
let dfd = self.dfd_borrow();
|
||||||
|
cap_std::fs::Dir::reopen_dir(&dfd.as_fd())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Find all objects reachable from a commit.
|
/// Find all objects reachable from a commit.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue