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(
42
42
) -> Vec < Event < ' static > > {
43
43
let profiler = Arc :: new ( Profiler :: new ( Path :: new ( filestem) ) . unwrap ( ) ) ;
44
44
45
- let event_id_virtual = EventId :: from_label ( StringId :: new_virtual ( 42 ) ) ;
45
+ let event_id_virtual = EventId :: from_label ( StringId :: new_virtual ( 42u64 ) ) ;
46
46
let event_id_builder = EventIdBuilder :: new ( & profiler) ;
47
47
48
48
let event_ids: Vec < ( StringId , EventId ) > = vec ! [
Original file line number Diff line number Diff line change @@ -80,12 +80,13 @@ impl StringId {
80
80
pub const INVALID : StringId = StringId ( INVALID_STRING_ID ) ;
81
81
82
82
#[ inline]
83
- pub fn new ( id : u64 ) -> StringId {
84
- StringId ( id)
83
+ pub fn new ( id : impl Into < u64 > ) -> StringId {
84
+ StringId ( id. into ( ) )
85
85
}
86
86
87
87
#[ inline]
88
- pub fn new_virtual ( id : u64 ) -> StringId {
88
+ pub fn new_virtual ( id : impl Into < u64 > ) -> StringId {
89
+ let id = id. into ( ) ;
89
90
assert ! ( id <= MAX_USER_VIRTUAL_STRING_ID ) ;
90
91
StringId ( id)
91
92
}
You can’t perform that action at this time.
0 commit comments