Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jan 16, 2025
1 parent e2258cb commit 723f0bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions turbopack/crates/turbopack-ecmascript/src/analyzer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4178,7 +4178,7 @@ mod tests {
condition, kind, ..
} => {
let condition =
resolve(&var_graph, condition, ImportAttributes::empty_ref())
resolve(&var_graph, *condition, ImportAttributes::empty_ref())
.await;
resolved.push((format!("{parent} -> {i} conditional"), condition));
match *kind {
Expand Down Expand Up @@ -4228,7 +4228,7 @@ mod tests {
} => {
let func = resolve(
&var_graph,
func,
*func,
eval_context.imports.get_attributes(span),
)
.await;
Expand All @@ -4243,11 +4243,11 @@ mod tests {
));
}
Effect::FreeVar { var, .. } => {
resolved.push((format!("{parent} -> {i} free var"), var));
resolved.push((format!("{parent} -> {i} free var"), *var));
}
Effect::TypeOf { arg, .. } => {
let arg =
resolve(&var_graph, arg, ImportAttributes::empty_ref()).await;
resolve(&var_graph, *arg, ImportAttributes::empty_ref()).await;
resolved.push((
format!("{parent} -> {i} typeof"),
JsValue::type_of(Box::new(arg)),
Expand All @@ -4257,9 +4257,9 @@ mod tests {
obj, prop, args, ..
} => {
let obj =
resolve(&var_graph, obj, ImportAttributes::empty_ref()).await;
resolve(&var_graph, *obj, ImportAttributes::empty_ref()).await;
let prop =
resolve(&var_graph, prop, ImportAttributes::empty_ref()).await;
resolve(&var_graph, *prop, ImportAttributes::empty_ref()).await;
let new_args = handle_args(args, &mut queue, &var_graph, i).await;
resolved.push((
format!("{parent} -> {i} member call"),
Expand Down
20 changes: 10 additions & 10 deletions turbopack/crates/turbopack-ecmascript/src/references/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ impl AnalysisState<'_> {
let fun_args_values = self.fun_args_values.lock().clone();
link(
self.var_graph,
value.clone(),
value,
&early_value_visitor,
&|value| {
value_visitor(
Expand Down Expand Up @@ -916,7 +916,7 @@ pub(crate) async fn analyse_ecmascript_module_internal(
let condition_has_side_effects = condition.has_side_effects();

let condition = analysis_state
.link_value(condition, ImportAttributes::empty_ref())
.link_value(*condition, ImportAttributes::empty_ref())
.await?;

macro_rules! inactive {
Expand Down Expand Up @@ -1069,7 +1069,7 @@ pub(crate) async fn analyse_ecmascript_module_internal(
}

let func = analysis_state
.link_value(func, eval_context.imports.get_attributes(span))
.link_value(*func, eval_context.imports.get_attributes(span))
.await?;

handle_call(
Expand Down Expand Up @@ -1101,10 +1101,10 @@ pub(crate) async fn analyse_ecmascript_module_internal(
}
}
let mut obj = analysis_state
.link_value(obj, ImportAttributes::empty_ref())
.link_value(*obj, ImportAttributes::empty_ref())
.await?;
let prop = analysis_state
.link_value(prop, ImportAttributes::empty_ref())
.link_value(*prop, ImportAttributes::empty_ref())
.await?;

if !new {
Expand Down Expand Up @@ -1171,11 +1171,11 @@ pub(crate) async fn analyse_ecmascript_module_internal(
} => {
// FreeVar("require") might be turbopackIgnore-d
if !analysis_state
.link_value(var.clone(), eval_context.imports.get_attributes(span))
.link_value(*var.clone(), eval_context.imports.get_attributes(span))
.await?
.is_unknown()
{
handle_free_var(&ast_path, var, span, &analysis_state, &mut analysis).await?;
handle_free_var(&ast_path, *var, span, &analysis_state, &mut analysis).await?;
}
}
Effect::Member {
Expand All @@ -1186,10 +1186,10 @@ pub(crate) async fn analyse_ecmascript_module_internal(
in_try: _,
} => {
let obj = analysis_state
.link_value(obj, ImportAttributes::empty_ref())
.link_value(*obj, ImportAttributes::empty_ref())
.await?;
let prop = analysis_state
.link_value(prop, ImportAttributes::empty_ref())
.link_value(*prop, ImportAttributes::empty_ref())
.await?;

handle_member(&ast_path, obj, prop, span, &analysis_state, &mut analysis).await?;
Expand Down Expand Up @@ -1247,7 +1247,7 @@ pub(crate) async fn analyse_ecmascript_module_internal(
span,
} => {
let arg = analysis_state
.link_value(arg, ImportAttributes::empty_ref())
.link_value(*arg, ImportAttributes::empty_ref())
.await?;
handle_typeof(&ast_path, arg, span, &analysis_state, &mut analysis).await?;
}
Expand Down

0 comments on commit 723f0bc

Please sign in to comment.