diff options
| author | Mica White <botahamec@outlook.com> | 2026-09-27 15:48:03 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-09-27 15:48:03 -0400 |
| commit | 35f6fc17d0c98f424e01904b8856cf42c80bcfd3 (patch) | |
| tree | ba99ada4ac6e149c00e5d820b9c5f65e82fed980 /src/compile.rs | |
| parent | 8399983fd45bc0f11eac9def280c0833ffb93c04 (diff) | |
Add buggy diagnostics
Diffstat (limited to 'src/compile.rs')
| -rw-r--r-- | src/compile.rs | 10 |
1 files changed, 3 insertions, 7 deletions
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) |
