From 7c25a8c5398fd5a80bdd17edde5a48df1b1914fd Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Wed, 21 Feb 2024 17:00:01 +0100 Subject: [PATCH] fix clippy warnings --- zenoh/src/sample.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zenoh/src/sample.rs b/zenoh/src/sample.rs index 6ae5f2405d..ff867cecee 100644 --- a/zenoh/src/sample.rs +++ b/zenoh/src/sample.rs @@ -528,7 +528,7 @@ pub struct QoS { impl QoS { /// Gets priority of the message. pub fn priority(&self) -> Priority { - let priority = match Priority::try_from(self.inner.get_priority()) { + match Priority::try_from(self.inner.get_priority()) { Ok(p) => p, Err(e) => { log::trace!( @@ -537,8 +537,7 @@ impl QoS { ); Priority::default() } - }; - priority + } } /// Gets congestion control of the message.