Skip to content

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

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

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

Conversation

@lndmrk

@lndmrk lndmrk commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@lndmrk lndmrk requested a review from boivie March 20, 2026 15:56
Comment thread src/api/mod.rs
/// 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