From 4144a2be0ad493ba08a76e3c687546288e576996 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Wed, 3 Apr 2024 11:16:44 +0100 Subject: [PATCH] Use the ? operator instead --- agb-addr2line/src/gwilym_encoding.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agb-addr2line/src/gwilym_encoding.rs b/agb-addr2line/src/gwilym_encoding.rs index f6f643ec..1ce957f5 100644 --- a/agb-addr2line/src/gwilym_encoding.rs +++ b/agb-addr2line/src/gwilym_encoding.rs @@ -38,9 +38,7 @@ impl<'a> Iterator for GwilymDecodeIter<'a> { type Item = u32; fn next(&mut self) -> Option { - let Some(chunk) = self.chunks.next() else { - return None; - }; + let chunk = self.chunks.next()?; let value = decode_chunk(chunk); if value & (1 << 16) != 0 {