Skip to content

Commit 1918119

Browse files
committed
fix silliness, delete nearly dead apis
1 parent 0b2a7f5 commit 1918119

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

turbopack/crates/turbo-tasks-backend/src/backend/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use turbo_tasks::{
3636
},
3737
event::{Event, EventListener},
3838
message_queue::TimingEvent,
39-
registry::get_value_type_global_name,
39+
registry::get_value_type,
4040
task_statistics::TaskStatisticsApi,
4141
trace::TraceRawVcs,
4242
turbo_tasks,
@@ -867,7 +867,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
867867

868868
let _span = tracing::trace_span!(
869869
"recomputation",
870-
cell_type = get_value_type_global_name(cell.type_id),
870+
cell_type = get_value_type(cell.type_id).global_name,
871871
cell_index = cell.index
872872
)
873873
.entered();
@@ -3133,7 +3133,7 @@ impl DebugTraceTransientTask {
31333133
cell_type_id: Option<ValueTypeId>,
31343134
) -> fmt::Result {
31353135
if let Some(ty) = cell_type_id {
3136-
write!(f, " (read cell of type {})", get_value_type_global_name(ty))
3136+
write!(f, " (read cell of type {})", get_value_type(ty).global_name)
31373137
} else {
31383138
Ok(())
31393139
}

turbopack/crates/turbo-tasks/src/registry.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static FUNCTIONS: Lazy<Functions> = Lazy::new(|| {
2929
let global_name = native_function.global_name;
3030
let new = names.insert(global_name);
3131
debug_assert!(
32-
!new,
32+
new,
3333
"multiple functions registered with name: {global_name}!"
3434
);
3535
}
@@ -103,10 +103,6 @@ pub fn get_value_type(id: ValueTypeId) -> &'static ValueType {
103103
VALUES.id_to_value[*id as usize - 1]
104104
}
105105

106-
pub fn get_value_type_global_name(id: ValueTypeId) -> &'static str {
107-
get_value_type(id).global_name
108-
}
109-
110106
struct Traits {
111107
id_to_trait: Box<[&'static TraitType]>,
112108
trait_to_id: FxHashMap<&'static TraitType, TraitTypeId>,
@@ -155,7 +151,3 @@ pub fn get_trait_type_id(trait_type: &'static TraitType) -> TraitTypeId {
155151
pub fn get_trait(id: TraitTypeId) -> &'static TraitType {
156152
TRAITS.id_to_trait[*id as usize - 1]
157153
}
158-
159-
pub fn get_trait_type_global_name(id: TraitTypeId) -> &'static str {
160-
get_trait(id).global_name
161-
}

turbopack/crates/turbo-tasks/src/task/shared_reference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl Serialize for TypedSharedReference {
116116
} else {
117117
Err(serde::ser::Error::custom(format!(
118118
"{:?} is not serializable",
119-
registry::get_value_type_global_name(*ty)
119+
registry::get_value_type(*ty).global_name
120120
)))
121121
}
122122
}

0 commit comments

Comments
 (0)