From 572194c0f29d45312ce1ff87a91320bbc59089b6 Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Tue, 30 Nov 2021 14:30:55 +0000 Subject: [PATCH] Decoder: mark redundant match arm as unreachable --- src/decode.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/decode.rs b/src/decode.rs index 59e898d..b6bfa12 100644 --- a/src/decode.rs +++ b/src/decode.rs @@ -135,7 +135,12 @@ where *px_out = px; continue; } - _ => {} + _ => { + unsafe { + // the compiler should figure it out on its own, but just in case + core::hint::unreachable_unchecked() + } + } } unsafe {