Skip to content

Commit f291450

Browse files
committed
Auto merge of #219 - michaelwoerister:prepare-release-11.0.0, r=michaelwoerister
Prepare 11.0.0 release The change here makes `StringId::new` and `StringId::new_virtual` backwards compatible with 10.x, so that we don't require unnecessary churn when updating to 11.0.0.
2 parents 8193f4d + e15b537 commit f291450

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

analyzeme/src/testing_common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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![

measureme/src/stringtable.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)