Streamline code.

This commit is contained in:
Stephen Chung
2022-10-14 14:04:54 +08:00
parent 3d0626c76f
commit 38e47c909d
6 changed files with 30 additions and 13 deletions

View File

@@ -24,13 +24,13 @@ impl Engine {
let root = namespace.root();
// Qualified - check if the root module is directly indexed
let index = if global.always_search_scope {
None
} else {
namespace.index()
};
// Qualified - check if the root module is directly indexed
if let Some(index) = index {
let offset = global.num_imports() - index.get();