diff --git a/fish-rust/src/topic_monitor.rs b/fish-rust/src/topic_monitor.rs index 195530005..efb7d4050 100644 --- a/fish-rust/src/topic_monitor.rs +++ b/fish-rust/src/topic_monitor.rs @@ -56,10 +56,7 @@ pub struct generation_list_t { /// The list of topics which may be observed. #[repr(u8)] - // clippy 1.72 complains that the PartialOrd should be "{ Some(self.cmp(other)) }" - // but that requires us to implement PartialOrd ourselves. - #[allow(clippy::incorrect_partial_ord_impl_on_ord_type)] - #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] + #[derive(Copy, Clone, Debug, PartialEq, Eq, Ord)] pub enum topic_t { sighupint, // Corresponds to both SIGHUP and SIGINT signals. sigchld, // Corresponds to SIGCHLD signal. @@ -78,6 +75,14 @@ pub enum topic_t { } } +// FIXME: #derive-ing this currently makes clippy complain +// about https://rust-lang.github.io/rust-clippy/master/index.html#/incorrect_partial_ord_impl_on_ord_type +impl PartialOrd for topic_t { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + pub use topic_monitor_ffi::{generation_list_t, topic_t}; pub type generation_t = u64;