From 7fe936dcc3565d174f1de913fa81082d6884cffe Mon Sep 17 00:00:00 2001 From: Arvind Mukund Date: Mon, 30 Oct 2023 21:19:00 -0700 Subject: [PATCH] Simplify `is_new_type` Signed-off-by: Arvind Mukund --- fiat-constify/src/type_registry.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fiat-constify/src/type_registry.rs b/fiat-constify/src/type_registry.rs index db1907d3..fe6c7468 100644 --- a/fiat-constify/src/type_registry.rs +++ b/fiat-constify/src/type_registry.rs @@ -47,13 +47,9 @@ impl TypeRegistry { self.0.get(ident).copied() } + #[inline] pub fn is_new_type(&self, ident: &syn::Ident) -> bool { - let mut included = false; - if matches!(self.get(ident), Some(Type::NewType)) { - included = true; - } - - included + matches!(self.get(ident), Some(Type::NewType)) } }