Skip to content

Commit

Permalink
Rebase on top of #68644
Browse files Browse the repository at this point in the history
  • Loading branch information
bgw committed Aug 14, 2024
1 parent edec37e commit d9a27a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions turbopack/crates/turbo-tasks-memory/src/memory_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use turbo_tasks::{
},
event::EventListener,
util::{IdFactoryWithReuse, NoMoveVec},
CellId, FunctionId, RawVc, TaskId, TaskIdSet, TaskInput, TraitTypeId, TurboTasksBackendApi,
Unused, ValueTypeId, TRANSIENT_TASK_BIT,
CellId, FunctionId, RawVc, TaskId, TaskIdSet, TraitTypeId, TurboTasksBackendApi, Unused,
ValueTypeId, TRANSIENT_TASK_BIT,
};

use crate::{
Expand Down
11 changes: 5 additions & 6 deletions turbopack/crates/turbo-tasks/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,17 @@ impl CachedTaskType {
/// it can return a `&'static str` in many cases.
pub fn get_name(&self) -> Cow<'static, str> {
match self {
CachedTaskType::Native {
Self::Native {
fn_type: native_fn,
this: _,
arg: _,
}
| CachedTaskType::ResolveNative {
| Self::ResolveNative {
fn_type: native_fn,
this: _,
arg: _,
} => Cow::Borrowed(&registry::get_function(*native_fn).name),
CachedTaskType::ResolveTrait {
Self::ResolveTrait {
trait_type: trait_id,
method_name: fn_name,
this: _,
Expand All @@ -313,9 +313,8 @@ impl CachedTaskType {

pub fn try_get_function_id(&self) -> Option<FunctionId> {
match self {
PersistentTaskType::Native { fn_type, .. }
| PersistentTaskType::ResolveNative { fn_type, .. } => Some(*fn_type),
PersistentTaskType::ResolveTrait { .. } => None,
Self::Native { fn_type, .. } | Self::ResolveNative { fn_type, .. } => Some(*fn_type),
Self::ResolveTrait { .. } => None,
}
}
}
Expand Down

0 comments on commit d9a27a9

Please sign in to comment.