feat(natu): ignore imported let bindings
This commit was merged in pull request #122.
This commit is contained in:
@@ -38,7 +38,8 @@ fn is_single_use(graph: &ScopeGraph, let_scope: &LetScope, binding: &Binding) ->
|
||||
.filter(|reference| graph.resolve(**reference).contains(&binding.declaration))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
self_references == 0
|
||||
!binding.is_import
|
||||
&& self_references == 0
|
||||
&& external_references.len() == 1
|
||||
&& (binding.is_lambda
|
||||
|| !graph.crosses_lambda_scope(*external_references[0], binding.declaration))
|
||||
|
||||
Reference in New Issue
Block a user