Skip to content

Commit

Permalink
Clippy at it again
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Sep 5, 2024
1 parent e47923c commit ba69e3d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions commons/zenoh-protocol/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ pub enum Priority {
Background = 7,
}

// TODO: Use Priority type
#[derive(Debug, Clone, Eq, Hash, PartialEq, Serialize)]
/// A `u8` range bounded inclusively below and above.
pub struct PriorityRange(RangeInclusive<Priority>);
Expand All @@ -334,7 +333,11 @@ impl PriorityRange {
}

pub fn len(&self) -> usize {
*self.end() as usize - *self.start() as usize + 1 // 1..=3, 3-1 == 2
*self.end() as usize - *self.start() as usize + 1
}

pub fn is_empty(&self) -> bool {
false
}

#[cfg(feature = "test")]
Expand Down

0 comments on commit ba69e3d

Please sign in to comment.