Unverified Commit f766f9b0 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: use vector instead of hash map (#84696)

No need to use a hashmap here.
parent 0a7811ca
...@@ -232,7 +232,7 @@ impl ServerActionsGraph { ...@@ -232,7 +232,7 @@ impl ServerActionsGraph {
}) })
.try_flat_join() .try_flat_join()
.await?; .await?;
Ok(Vc::cell(actions.into_iter().collect())) Ok(Vc::cell(actions))
} }
.instrument(span) .instrument(span)
.await .await
...@@ -730,7 +730,7 @@ impl GlobalBuildInformation { ...@@ -730,7 +730,7 @@ impl GlobalBuildInformation {
.try_flat_join() .try_flat_join()
.await?; .await?;
Ok(Vc::cell(result.into_iter().collect())) Ok(Vc::cell(result))
} }
} }
.instrument(span) .instrument(span)
......
...@@ -416,7 +416,7 @@ fn is_turbopack_internal_var(with: &Option<Box<ObjectLit>>) -> bool { ...@@ -416,7 +416,7 @@ fn is_turbopack_internal_var(with: &Option<Box<ObjectLit>>) -> bool {
.unwrap_or(false) .unwrap_or(false)
} }
type HashToLayerNameModule = FxIndexMap<String, (ActionLayer, String, ResolvedVc<Box<dyn Module>>)>; type HashToLayerNameModule = Vec<(String, (ActionLayer, String, ResolvedVc<Box<dyn Module>>))>;
/// A mapping of every module which exports a Server Action, with the hashed id /// A mapping of every module which exports a Server Action, with the hashed id
/// and exported name of each found action. /// and exported name of each found action.
...@@ -427,7 +427,7 @@ pub struct AllActions(HashToLayerNameModule); ...@@ -427,7 +427,7 @@ pub struct AllActions(HashToLayerNameModule);
impl AllActions { impl AllActions {
#[turbo_tasks::function] #[turbo_tasks::function]
pub fn empty() -> Vc<Self> { pub fn empty() -> Vc<Self> {
Vc::cell(FxIndexMap::default()) Vc::cell(Default::default())
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment