mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-01-21 18:54:08 +01:00
Use #[non_exhaustive] in lieu of _NonExhaustive enum variant.
This commit is contained in:
@@ -38,6 +38,7 @@ use std::{io, time::SystemTime};
|
||||
/// A message from a client to a server.
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[non_exhaustive]
|
||||
pub enum ClientMessage<T> {
|
||||
/// A request initiated by a user. The server responds to a request by invoking a
|
||||
/// service-provided request handler. The handler completes with a [`response`](Response), which
|
||||
@@ -58,8 +59,6 @@ pub enum ClientMessage<T> {
|
||||
/// The ID of the request to cancel.
|
||||
request_id: u64,
|
||||
},
|
||||
#[doc(hidden)]
|
||||
_NonExhaustive,
|
||||
}
|
||||
|
||||
/// A request from a client to a server.
|
||||
|
||||
@@ -304,7 +304,6 @@ where
|
||||
} => {
|
||||
self.as_mut().cancel_request(&trace_context, request_id);
|
||||
}
|
||||
ClientMessage::_NonExhaustive => unreachable!(),
|
||||
},
|
||||
None => return Poll::Ready(None),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user