Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ targets = [

[dependencies]
libc = { version = "=0.2.175", features = ["extra_traits"] }
bitflags = "2.3.3"
bitflags = "2.4"
cfg-if = "1.0"
pin-utils = { version = "0.1.0", optional = true }
memoffset = { version = "0.9", optional = true }
Expand Down Expand Up @@ -78,6 +78,15 @@ parking_lot = "0.12"
rand = "0.9"
tempfile = "3.7.1"
semver = "1.0.7"

# parking_lot_core and lock_api are indirect dependencies, so they normally should
# not appear here. However, we include them because we want Cargo to pick the exact
# version that we choose here when resolving dependencies. Newer versions of them
# require MSRV 1.71, our current MSRV is 1.69.
parking_lot_core = "=0.9.11"
lock_api = "=0.4.13"

# To make IDE/LSP work better
nix = { path = ".", features = ["acct", "aio", "dir", "env", "event", "fanotify",
"feature", "fs", "hostname", "inotify", "ioctl", "kmod", "mman", "mount", "mqueue",
"net", "personality", "poll", "pthread", "ptrace", "quota", "process", "reboot",
Expand Down
6 changes: 4 additions & 2 deletions src/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,10 @@ pub struct Flock<T: Flockable>(T);
impl<T: Flockable> Drop for Flock<T> {
fn drop(&mut self) {
let res = Errno::result(unsafe { libc::flock(self.0.as_raw_fd(), libc::LOCK_UN) });
if res.is_err() && !std::thread::panicking() {
panic!("Failed to remove flock: {}", res.unwrap_err());
if let Err(e) = res {
if !std::thread::panicking() {
panic!("Failed to remove flock: {}", e);
}
}
}
}
Expand Down
Loading