From 35f6fc17d0c98f424e01904b8856cf42c80bcfd3 Mon Sep 17 00:00:00 2001 From: Mica White Date: Sun, 27 Sep 2026 15:48:03 -0400 Subject: Add buggy diagnostics --- src/compile.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/compile.rs') diff --git a/src/compile.rs b/src/compile.rs index ccbf6f0..9e19b18 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -8,16 +8,12 @@ fn symbol_table_from_path<'a>( ) -> Option<&'a ScopedSymbolTable<'a>> { let mut symbol_table = symbol_table; for component in path.split("::") { - if let Some(module) = symbol_table + let module = symbol_table .modules .values() .find(|module| module.name == Some(component)) - .and_then(|module| module.symbol_table) - { - symbol_table = module; - } else { - return None; - } + .and_then(|module| module.symbol_table)?; + symbol_table = module; } Some(symbol_table) -- cgit v1.3.1