From 85cfcc817682beb7bdbc42f75ec2a9e997c2fe9a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 19 Jun 2024 18:15:08 +0200 Subject: [PATCH] .ok().unwrap() Signed-off-by: Oliver Tale-Yazdi --- serialize/src/impls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serialize/src/impls.rs b/serialize/src/impls.rs index 9e46fab58..5c62a5e69 100644 --- a/serialize/src/impls.rs +++ b/serialize/src/impls.rs @@ -470,7 +470,7 @@ impl CanonicalDeserialize for [T; N] { if let Validate::Yes = validate { T::batch_check(array.iter())? } - Ok(array.into_inner().unwrap_or_else(|_| unreachable!())) + Ok(array.into_inner().ok().unwrap()) } }