diff --git a/src/client.rs b/src/client.rs index 6ab430fb6..08aa5b9dd 100644 --- a/src/client.rs +++ b/src/client.rs @@ -204,9 +204,9 @@ pub(crate) enum EventPollResult { Event(T), } -impl Into> for EventPollResult { - fn into(self) -> Option { - match self { +impl From> for Option { + fn from(val: EventPollResult) -> Self { + match val { EventPollResult::None | EventPollResult::EventConsumed => None, EventPollResult::Event(evt) => Some(evt), }