mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
chore(turbopack-browser): Pedantically fix minor typos in comments about TraitRef (#73772)
I was looking for callsites of `TraitRef` and found these minor typos, which annoyed me a bit, so I'm fixing them: - It's `TraitRef<Box<dyn Foo>>`, not `TraitRef<Vc<Box<dyn Foo>>>`. - This is a reference to an associated function, so it should use a turbofish. - Re-wrap with the newer fixed 120 column line wrap for columns.
This commit is contained in:
@@ -70,10 +70,9 @@ pub(super) async fn update_chunk_list(
|
||||
let to = to_version.await?;
|
||||
let from = from_version.await?;
|
||||
|
||||
// When to and from point to the same value we can skip comparing them.
|
||||
// This will happen since `TraitRef<Vc<Box<dyn Version>>>::cell` will not clone
|
||||
// the value, but only make the cell point to the same immutable value
|
||||
// (Arc).
|
||||
// When to and from point to the same value we can skip comparing them. This will happen since
|
||||
// `TraitRef::<Box<dyn Version>>::cell` will not clone the value, but only make the cell point
|
||||
// to the same immutable value (`Arc`).
|
||||
if from.ptr_eq(&to) {
|
||||
return Ok(Update::None.cell());
|
||||
}
|
||||
|
||||
@@ -158,10 +158,9 @@ pub(super) async fn update_ecmascript_merged_chunk(
|
||||
let to = to_merged_version.await?;
|
||||
let from = from_merged_version.await?;
|
||||
|
||||
// When to and from point to the same value we can skip comparing them.
|
||||
// This will happen since `TraitRef<Vc<Box<dyn Version>>>::cell` will not clone
|
||||
// the value, but only make the cell point to the same immutable value
|
||||
// (Arc).
|
||||
// When to and from point to the same value we can skip comparing them. This will happen since
|
||||
// `TraitRef::<Box<dyn Version>>::cell` will not clone the value, but only make the cell point
|
||||
// to the same immutable value (`Arc`).
|
||||
if from.ptr_eq(&to) {
|
||||
return Ok(Update::None);
|
||||
}
|
||||
|
||||
@@ -22,10 +22,9 @@ pub(super) async fn update_ecmascript_chunk(
|
||||
) -> Result<EcmascriptChunkUpdate> {
|
||||
let to = content.own_version().await?;
|
||||
|
||||
// When to and from point to the same value we can skip comparing them.
|
||||
// This will happen since `TraitRef<Vc<Box<dyn Version>>>::cell` will not clone
|
||||
// the value, but only make the cell point to the same immutable value
|
||||
// (Arc).
|
||||
// When to and from point to the same value we can skip comparing them. This will happen since
|
||||
// `TraitRef::<Box<dyn Version>>::cell` will not clone the value, but only make the cell point
|
||||
// to the same immutable value (`Arc`).
|
||||
if from.ptr_eq(&to) {
|
||||
return Ok(EcmascriptChunkUpdate::None);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user