Skip to content

Replace inherent LifecycleId::from with standard From<u64> trait#107

Draft
lndmrk wants to merge 1 commit intowebrtc:mainfrom
lndmrk:impl-from
Draft

Replace inherent LifecycleId::from with standard From<u64> trait#107
lndmrk wants to merge 1 commit intowebrtc:mainfrom
lndmrk:impl-from

Conversation

@lndmrk
Copy link
Copy Markdown
Collaborator

@lndmrk lndmrk commented Mar 20, 2026

No description provided.

@lndmrk lndmrk requested a review from boivie March 20, 2026 15:56
/// Panics if `n` is zero.
pub fn from(n: u64) -> LifecycleId {
fn from(n: u64) -> Self {
debug_assert!(n != 0);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed my mind, I don't think this is idiomatic. I'll come up with something else to unify these two constructors.

@lndmrk lndmrk marked this pull request as draft March 20, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant