We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 934c580 commit 3f2b74bCopy full SHA for 3f2b74b
src/client.rs
@@ -204,9 +204,9 @@ pub(crate) enum EventPollResult<T> {
204
Event(T),
205
}
206
207
-impl<T> Into<Option<T>> for EventPollResult<T> {
208
- fn into(self) -> Option<T> {
209
- match self {
+impl<T> From<EventPollResult<T>> for Option<T> {
+ fn from(val: EventPollResult<T>) -> Self {
+ match val {
210
EventPollResult::None | EventPollResult::EventConsumed => None,
211
EventPollResult::Event(evt) => Some(evt),
212
0 commit comments