File tree Expand file tree Collapse file tree 3 files changed +5
-14
lines changed
turbo-tasks-backend/src/backend Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ use turbo_tasks::{
36
36
} ,
37
37
event:: { Event , EventListener } ,
38
38
message_queue:: TimingEvent ,
39
- registry:: get_value_type_global_name ,
39
+ registry:: get_value_type ,
40
40
task_statistics:: TaskStatisticsApi ,
41
41
trace:: TraceRawVcs ,
42
42
turbo_tasks,
@@ -867,7 +867,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
867
867
868
868
let _span = tracing:: trace_span!(
869
869
"recomputation" ,
870
- cell_type = get_value_type_global_name ( cell. type_id) ,
870
+ cell_type = get_value_type ( cell. type_id) . global_name ,
871
871
cell_index = cell. index
872
872
)
873
873
. entered ( ) ;
@@ -3133,7 +3133,7 @@ impl DebugTraceTransientTask {
3133
3133
cell_type_id : Option < ValueTypeId > ,
3134
3134
) -> fmt:: Result {
3135
3135
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 )
3137
3137
} else {
3138
3138
Ok ( ( ) )
3139
3139
}
Original file line number Diff line number Diff line change @@ -28,9 +28,8 @@ static FUNCTIONS: Lazy<Functions> = Lazy::new(|| {
28
28
for & native_function in functions. iter ( ) {
29
29
value_to_id. insert ( native_function, id. into ( ) ) ;
30
30
let global_name = native_function. global_name ;
31
- let new = names. insert ( global_name) ;
32
31
assert ! (
33
- !new ,
32
+ names . insert ( global_name ) ,
34
33
"multiple functions registered with name: {global_name}!"
35
34
) ;
36
35
id = id. checked_add ( 1 ) . expect ( "overflowing function ids" ) ;
@@ -101,10 +100,6 @@ pub fn get_value_type(id: ValueTypeId) -> &'static ValueType {
101
100
VALUES . id_to_value [ * id as usize - 1 ]
102
101
}
103
102
104
- pub fn get_value_type_global_name ( id : ValueTypeId ) -> & ' static str {
105
- get_value_type ( id) . global_name
106
- }
107
-
108
103
struct Traits {
109
104
id_to_trait : Box < [ & ' static TraitType ] > ,
110
105
trait_to_id : FxHashMap < & ' static TraitType , TraitTypeId > ,
@@ -149,7 +144,3 @@ pub fn get_trait_type_id(trait_type: &'static TraitType) -> TraitTypeId {
149
144
pub fn get_trait ( id : TraitTypeId ) -> & ' static TraitType {
150
145
TRAITS . id_to_trait [ * id as usize - 1 ]
151
146
}
152
-
153
- pub fn get_trait_type_global_name ( id : TraitTypeId ) -> & ' static str {
154
- get_trait ( id) . global_name
155
- }
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ impl Serialize for TypedSharedReference {
116
116
} else {
117
117
Err ( serde:: ser:: Error :: custom ( format ! (
118
118
"{:?} is not serializable" ,
119
- registry:: get_value_type_global_name ( * ty)
119
+ registry:: get_value_type ( * ty) . global_name
120
120
) ) )
121
121
}
122
122
}
You can’t perform that action at this time.
0 commit comments