From 3e3809a87cbcd8a2cfc07f2c347a5cfac20e8c5d Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Wed, 1 Jan 2025 12:33:49 +0100 Subject: [PATCH] WIP --- cli/tools/lint/ast_buffer/selector.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cli/tools/lint/ast_buffer/selector.rs b/cli/tools/lint/ast_buffer/selector.rs index 11284e8c04..d680499d0c 100644 --- a/cli/tools/lint/ast_buffer/selector.rs +++ b/cli/tools/lint/ast_buffer/selector.rs @@ -295,26 +295,17 @@ impl SelectorMatcher for Elem { #[derive(Debug, PartialEq)] struct Selector { - // short circuit if the selecor cannot match - never: bool, parts: Vec, } impl Selector { fn new() -> Self { - Self { - never: false, - parts: vec![], - } + Self { parts: vec![] } } } impl SelectorMatcher for Selector { fn matches(&mut self, offset: usize) -> bool { - if self.never { - return false; - } - self.parts.iter().all(|part| match part { SelPart::Wildcard => todo!(), SelPart::Elem(_) => todo!(),