From 07eb854e5c1808e19091cd6417775e454ebed1ce Mon Sep 17 00:00:00 2001 From: Ketasaja <153110145+Ketasaja@users.noreply.github.com> Date: Tue, 2 Jul 2024 22:41:01 +0000 Subject: [PATCH] Refactor `tydecls` key check (#118) --- zap/src/parser/convert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zap/src/parser/convert.rs b/zap/src/parser/convert.rs index 1c4f7850..682c9217 100644 --- a/zap/src/parser/convert.rs +++ b/zap/src/parser/convert.rs @@ -436,7 +436,7 @@ impl<'src> Converter<'src> { "unknown" => Ty::Opt(Box::new(Ty::Unknown)), _ => { - if self.tydecls.get(name).is_none() { + if !self.tydecls.contains_key(name) { self.report(Report::AnalyzeUnknownTypeRef { span: ref_ty.span(), name,