Shut up Clippy 1.72

This commit is contained in:
Fabian Boehm 2023-10-06 16:52:57 +02:00
parent ff433b0cb2
commit 1073f59929
2 changed files with 4 additions and 1 deletions

View file

@ -269,7 +269,7 @@ impl EventHandler {
pub fn new(desc: EventDescription, name: Option<WString>) -> Self {
Self {
desc,
function_name: name.unwrap_or_else(WString::new),
function_name: name.unwrap_or_default(),
removed: AtomicBool::new(false),
fired: AtomicBool::new(false),
}

View file

@ -56,6 +56,9 @@ mod topic_monitor_ffi {
/// 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)]
pub enum topic_t {
sighupint, // Corresponds to both SIGHUP and SIGINT signals.