Skip to content

Commit 3f2b74b

Browse files
committed
use from
1 parent 934c580 commit 3f2b74b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ pub(crate) enum EventPollResult<T> {
204204
Event(T),
205205
}
206206

207-
impl<T> Into<Option<T>> for EventPollResult<T> {
208-
fn into(self) -> Option<T> {
209-
match self {
207+
impl<T> From<EventPollResult<T>> for Option<T> {
208+
fn from(val: EventPollResult<T>) -> Self {
209+
match val {
210210
EventPollResult::None | EventPollResult::EventConsumed => None,
211211
EventPollResult::Event(evt) => Some(evt),
212212
}

0 commit comments

Comments
 (0)