Skip to content

Commit

Permalink
fix(turbopack): Fix deprecation warnings from unnecessary `.to_resolv…
Browse files Browse the repository at this point in the history
…ed()` calls
  • Loading branch information
bgw committed Dec 6, 2024
1 parent f8494b4 commit b8a1c4a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
6 changes: 3 additions & 3 deletions crates/next-core/src/next_app/app_client_references_chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub async fn get_app_client_references_chunks(

(
(
client_chunk_group.assets.to_resolved().await?,
client_chunk_group.assets,
client_chunk_group.availability_info,
),
if let Some(ssr_chunking_context) = ssr_chunking_context {
Expand All @@ -88,7 +88,7 @@ pub async fn get_app_client_references_chunks(
.await?;

Some((
ssr_chunk_group.assets.to_resolved().await?,
ssr_chunk_group.assets,
ssr_chunk_group.availability_info,
))
} else {
Expand All @@ -103,7 +103,7 @@ pub async fn get_app_client_references_chunks(

(
(
client_chunk_group.assets.to_resolved().await?,
client_chunk_group.assets,
client_chunk_group.availability_info,
),
None,
Expand Down
6 changes: 2 additions & 4 deletions turbopack/crates/turbopack-core/src/chunk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,7 @@ async fn graph_node_to_referenced_nodes(
return Ok((
Some(ChunkGraphEdge {
key: None,
node: ChunkContentGraphNode::ExternalModuleReference(
reference.to_resolved().await?,
),
node: ChunkContentGraphNode::ExternalModuleReference(reference),
}),
None,
));
Expand Down Expand Up @@ -622,7 +620,7 @@ async fn chunk_content_internal_parallel(
return Ok(None);
};
Ok(Some(ChunkGraphEdge {
key: Some(entry.to_resolved().await?),
key: Some(entry),
node: ChunkContentGraphNode::ChunkItem {
item: chunkable_module.as_chunk_item(chunking_context),
ident: chunkable_module.ident().to_string().await?,
Expand Down
5 changes: 0 additions & 5 deletions turbopack/crates/turbopack-core/src/issue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,6 @@ async fn source_pos(
return Ok(None);
};

let (content_1, content_2) = (
content_1.to_resolved().await?,
content_2.to_resolved().await?,
);

if content_1 != content_2 {
return Ok(None);
}
Expand Down
3 changes: 0 additions & 3 deletions turbopack/crates/turbopack-core/src/source_map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,6 @@ impl SourceMap {
.await?;
sections.push(SourceMapSection::new(section.offset, map));
}
for section in &mut sections {
section.map = section.map.to_resolved().await?;
}
SourceMap::new_sectioned(sections)
}
}
Expand Down
2 changes: 1 addition & 1 deletion turbopack/crates/turbopack-css/src/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl CssChunkItem for CssModuleChunkItem {
Vc::try_resolve_downcast::<Box<dyn CssChunkItem>>(item).await?
{
imports.push(CssImport::Internal(
import_ref.to_resolved().await?,
import_ref,
css_item.to_resolved().await?,
));
}
Expand Down

0 comments on commit b8a1c4a

Please sign in to comment.