yoshuawuyts / fd-lock

Advisory cross-platform file locks using file descriptors
Apache License 2.0
76 stars 18 forks source link

Remove dependency on failure #6

Closed Veetaha closed 4 years ago

Veetaha commented 4 years ago

Description

The crate no longer depends on failure. The error now implements std::error::Error. Note that this is a BREAKING CHANGE, because failure::Context was leaked to the public API (via From<Context<ErrorKind>> impl. Whilst this introduces a breaking change (which essentially means moving to v2.0.0) I suggest making distinct error types for lock() and try_lock() functions as it is done for std::sync::Mutex::lock and std::sync::Mutex::try_lock, besides that it would be nice to have an ability to handle unlock error, this would just mean having a consuming unlock(self) method which returns a Result.

@yoshuawuyts I see this repo hasn't seen enough activity lately, but this is the crate people see one of the first when googling for file locks in Rust. If you feel you don't have enough time/motivation for maintaining it I suggest my help with that.

Motivation and Context

Closes #4

Types of changes

Veetaha commented 4 years ago

Closing due to the lack of feedback