From eaae11a82e2d054658be871370cb77fc68ead99e Mon Sep 17 00:00:00 2001 From: Martin Pedersen Date: Fri, 22 Sep 2023 13:44:28 +0000 Subject: [PATCH] fix clippy --- src/document.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/document.rs b/src/document.rs index 586ddbf..363f6de 100644 --- a/src/document.rs +++ b/src/document.rs @@ -852,19 +852,15 @@ impl Document { | "neg_expr" ) }) { - if node_to_type(&node) - .or_else(|| { - let ident = get_node_text(&self.rope, &node); - let ident_parts = ident.split('.').collect::>(); - global_scope - .get_type_property_by_nested_idents(ident_parts.clone()) - .cloned() - }) + let ident = get_node_text(&self.rope, &node); + let ident_parts = ident.split('.').collect::>(); + if global_scope + .get_type_property_by_nested_idents(ident_parts.clone()) .is_none() { add_error!(node: node, "Not found"); continue; - }; + } } } }