File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ fn generate_profiling_data(
4242) -> Vec < Event < ' static > > {
4343 let profiler = Arc :: new ( Profiler :: new ( Path :: new ( filestem) ) . unwrap ( ) ) ;
4444
45- let event_id_virtual = EventId :: from_label ( StringId :: new_virtual ( 42 ) ) ;
45+ let event_id_virtual = EventId :: from_label ( StringId :: new_virtual ( 42u64 ) ) ;
4646 let event_id_builder = EventIdBuilder :: new ( & profiler) ;
4747
4848 let event_ids: Vec < ( StringId , EventId ) > = vec ! [
Original file line number Diff line number Diff line change @@ -80,12 +80,13 @@ impl StringId {
8080 pub const INVALID : StringId = StringId ( INVALID_STRING_ID ) ;
8181
8282 #[ inline]
83- pub fn new ( id : u64 ) -> StringId {
84- StringId ( id)
83+ pub fn new ( id : impl Into < u64 > ) -> StringId {
84+ StringId ( id. into ( ) )
8585 }
8686
8787 #[ inline]
88- pub fn new_virtual ( id : u64 ) -> StringId {
88+ pub fn new_virtual ( id : impl Into < u64 > ) -> StringId {
89+ let id = id. into ( ) ;
8990 assert ! ( id <= MAX_USER_VIRTUAL_STRING_ID ) ;
9091 StringId ( id)
9192 }
You can’t perform that action at this time.
0 commit comments