Skip to content

Commit

Permalink
refactor: remove needing to pass in referrer Symbol to `resolve_sym…
Browse files Browse the repository at this point in the history
…bol_dep` (#482)
  • Loading branch information
dsherret authored May 18, 2024
1 parent 13efd84 commit 09b860d
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 105 deletions.
6 changes: 2 additions & 4 deletions src/symbols/analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use super::collections::AdditiveOnlyMapForCopyValues;
use super::cross_module;
use super::cross_module::Definition;
use super::cross_module::DefinitionOrUnresolved;
use super::cross_module::DefinitionPath;
use super::cross_module::DefinitionPathNode;
use super::cross_module::ModuleExports;
use super::dep_analyzer::ResolveDepsMode;
use super::swc_helpers::ts_entity_name_to_parts;
Expand Down Expand Up @@ -140,7 +140,7 @@ impl<'a> RootSymbol<'a> {
&'b self,
module: ModuleInfoRef<'b>,
symbol: &'b Symbol,
) -> Vec<DefinitionPath<'b>> {
) -> Vec<DefinitionPathNode<'b>> {
debug_assert_eq!(symbol.module_id(), module.module_id());
super::cross_module::find_definition_paths(
self.module_graph,
Expand All @@ -153,13 +153,11 @@ impl<'a> RootSymbol<'a> {
pub fn resolve_symbol_dep<'b>(
&'b self,
module: ModuleInfoRef<'b>,
symbol: &'b Symbol,
dep: &SymbolNodeDep,
) -> Vec<ResolvedSymbolDepEntry<'b>> {
super::cross_module::resolve_symbol_dep(
self.module_graph,
module,
symbol,
dep,
&|specifier| self.module_from_specifier(specifier),
)
Expand Down
Loading

0 comments on commit 09b860d

Please sign in to comment.