Merge pull request #15 from Zeegomo/remove-bound-on-send

remove unneeded type bounds on send
This commit is contained in:
Giacomo Pasini 2023-01-09 18:06:10 +01:00 committed by GitHub
commit cc2d562d38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
pub async fn send(&self, message: M) -> Result<(), (RelayError, M)> {
self.sender
@ -134,7 +134,9 @@ impl<M: Send + 'static> OutboundRelay<M> {
.blocking_send(message)
.map_err(|e| (RelayError::Send, e.0))
}
}
impl<M: Send + 'static> OutboundRelay<M> {
pub fn into_sink(self) -> impl Sink<M> {
PollSender::new(self.sender)
}