remove unneeded type bounds on send

This commit is contained in:
Giacomo Pasini 2023-01-09 17:44:34 +01:00
parent d15e85c545
commit 5844bea0c9
No known key found for this signature in database
GPG Key ID: A03851B78A6C9A46
1 changed files with 3 additions and 1 deletions

View File

@ -109,7 +109,7 @@ impl<M> InboundRelay<M> {
} }
} }
impl<M: Send + 'static> OutboundRelay<M> { impl<M> OutboundRelay<M> {
/// Send a message to the relay connection /// Send a message to the relay connection
pub async fn send(&self, message: M) -> Result<(), (RelayError, M)> { pub async fn send(&self, message: M) -> Result<(), (RelayError, M)> {
self.sender self.sender
@ -134,7 +134,9 @@ impl<M: Send + 'static> OutboundRelay<M> {
.blocking_send(message) .blocking_send(message)
.map_err(|e| (RelayError::Send, e.0)) .map_err(|e| (RelayError::Send, e.0))
} }
}
impl<M: Send + 'static> OutboundRelay<M> {
pub fn into_sink(self) -> impl Sink<M> { pub fn into_sink(self) -> impl Sink<M> {
PollSender::new(self.sender) PollSender::new(self.sender)
} }