diff --git a/commons/zenoh-protocol/src/core/mod.rs b/commons/zenoh-protocol/src/core/mod.rs index 38bdfd42d5..c85f0fb73d 100644 --- a/commons/zenoh-protocol/src/core/mod.rs +++ b/commons/zenoh-protocol/src/core/mod.rs @@ -409,10 +409,10 @@ impl Reliability { /// Returns `true` is `self` implies `other`. pub fn implies(self, other: Self) -> bool { - match (self, other) { - (Reliability::Reliable, Reliability::BestEffort) => false, - _ => true, - } + !matches!( + (self, other), + (Reliability::Reliable, Reliability::BestEffort) + ) } #[cfg(feature = "test")]