hannobraun / inotify-rs

Idiomatic inotify wrapper for the Rust programming language
ISC License
261 stars 65 forks source link

Add Ord/PartialOrd instances to WatchDescriptor #183

Closed RaoulHC closed 3 years ago

RaoulHC commented 3 years ago

As inotify watch descriptors don't have an order per se, an alternative would be to make the id field public outside of the crate, so users of this library can implement a wrapper that implements traits based on id. Otherwise some data structures can't use a WatchDescriptor as a key which can be useful (i.e. BTreeMap<WatchDescriptor, PathBuf>).

hannobraun commented 3 years ago

Published in version 0.9.5: https://crates.io/crates/inotify/0.9.5