Skip to content

Commit

Permalink
Simplify is_new_type
Browse files Browse the repository at this point in the history
Signed-off-by: Arvind Mukund <armu30@gmail.com>
  • Loading branch information
MasterAwesome committed Dec 17, 2023
1 parent 1384727 commit 7fe936d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fiat-constify/src/type_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down

0 comments on commit 7fe936d

Please sign in to comment.