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:
Benjamin Woodruff
2024-12-13 13:03:42 -08:00
committed by GitHub
parent 4ba58437be
commit c4b2df2bd5
3 changed files with 9 additions and 12 deletions
@@ -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);
}