From 5708ea1e3f8f1dc175b54ae9fee771c85defdb63 Mon Sep 17 00:00:00 2001 From: Markus Legner Date: Fri, 17 May 2024 08:25:39 +0200 Subject: [PATCH] chore: fix new lint warning --- crates/scion-proto/src/path/standard.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/scion-proto/src/path/standard.rs b/crates/scion-proto/src/path/standard.rs index c457ccd..8ae1eb8 100644 --- a/crates/scion-proto/src/path/standard.rs +++ b/crates/scion-proto/src/path/standard.rs @@ -126,9 +126,7 @@ where /// /// There are always at most 3 segments. pub fn segment(&self, segment_index: usize) -> Option { - 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.