Skip to content

Commit

Permalink
use from
Browse files Browse the repository at this point in the history
  • Loading branch information
trtt committed Aug 29, 2024
1 parent 934c580 commit 3f2b74b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ pub(crate) enum EventPollResult<T> {
Event(T),
}

impl<T> Into<Option<T>> for EventPollResult<T> {
fn into(self) -> Option<T> {
match self {
impl<T> From<EventPollResult<T>> for Option<T> {
fn from(val: EventPollResult<T>) -> Self {
match val {
EventPollResult::None | EventPollResult::EventConsumed => None,
EventPollResult::Event(evt) => Some(evt),
}
Expand Down

0 comments on commit 3f2b74b

Please sign in to comment.