Commit 2f5343fa authored by Niklas Mischkulnig's avatar Niklas Mischkulnig

Turbopack: shorter error for ChunkGroupInfo::get_index_of (#92814)

parent 2ad9d3fb
...@@ -108,16 +108,20 @@ impl ChunkGroupInfo { ...@@ -108,16 +108,20 @@ impl ChunkGroupInfo {
if let Some(idx) = self.chunk_groups.get_index_of(&chunk_group) { if let Some(idx) = self.chunk_groups.get_index_of(&chunk_group) {
Ok(Vc::cell(idx)) Ok(Vc::cell(idx))
} else { } else {
bail!( if cfg!(debug_assertions) {
"Couldn't find chunk group index for {} in {}", bail!(
chunk_group.debug_str(self).await?, "Couldn't find chunk group index for {} in {}",
self.chunk_groups chunk_group.debug_str(self).await?,
.iter() self.chunk_groups
.map(|c| c.debug_str(self)) .iter()
.try_join() .map(|c| c.debug_str(self))
.await? .try_join()
.join(", ") .await?
); .join(", ")
);
} else {
bail!("Couldn't find chunk group index")
}
} }
} }
} }
......
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