From 3f2b74bc5e18f6a77974fcb59073e99108ccdfb5 Mon Sep 17 00:00:00 2001 From: Aleksandr Trukhin Date: Thu, 29 Aug 2024 20:45:22 +0400 Subject: [PATCH] use from --- src/client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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), }