Skip to content

Rename fallible constructors to use try prefix#106

Open
lndmrk wants to merge 1 commit intowebrtc:mainfrom
lndmrk:fallible-init
Open

Rename fallible constructors to use try prefix#106
lndmrk wants to merge 1 commit intowebrtc:mainfrom
lndmrk:fallible-init

Conversation

@lndmrk
Copy link
Collaborator

@lndmrk lndmrk commented Mar 20, 2026

This makes it easier to understand which initializations can fail at the call site.

This makes it easier to understand which initializations can fail at the
call site.
@lndmrk lndmrk requested a review from boivie March 20, 2026 15:47
.events
.borrow_mut()
.add(SocketEvent::OnError(ErrorKind::ParseFailed, s.into()));
.add(SocketEvent::OnError(ErrorKind::ParseFailed, s.to_string()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

from into() to to_string() is a bit unrelated to the rest of this commit, and to_string() isn't necessarily the same (it happens to be for this type), as it uses the Display trait. It's fine in this case, though.

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.

2 participants