Skip to content

Commit

Permalink
chore: fix new lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mlegner committed May 17, 2024
1 parent 9a54c48 commit 118d5b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions crates/scion-proto/src/path/standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ where
///
/// There are always at most 3 segments.
pub fn segment(&self, segment_index: usize) -> Option<Segment> {
let Some(info_field) = self.info_field(segment_index) else {
return None;
};
let info_field = self.info_field(segment_index)?;

// Get the index of the first hop field in the segment.
// This is equivalent to the index after all preceding hop fields.
Expand Down
4 changes: 1 addition & 3 deletions crates/scion/src/pan/path_strategy/refresher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,7 @@ impl<'a> Iterator for PathsTo<'a> {
type Item = &'a Path;

fn next(&mut self) -> Option<Self::Item> {
let Some(paths) = self.paths else {
return None;
};
let paths = self.paths?;

#[allow(clippy::while_let_on_iterator)]
while let Some(info) = self.inner.next() {
Expand Down

0 comments on commit 118d5b2

Please sign in to comment.