Skip to content

Commit

Permalink
clippy fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
fakeshadow committed Feb 27, 2024
1 parent 2092992 commit de33e4f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions http-ws/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,8 @@ impl ResponseSender {

/// encode [Message::Close] variant and add to [ResponseStream].
/// take ownership of Self as after close message no more message can be sent to client.
pub fn close(
self,
reason: Option<impl Into<CloseReason> + 'static>,
) -> impl Future<Output = Result<(), ProtocolError>> + 'static {
async move { self.send(Message::Close(reason.map(Into::into))).await }
pub async fn close(self, reason: Option<impl Into<CloseReason>>) -> Result<(), ProtocolError> {
self.send(Message::Close(reason.map(Into::into))).await
}
}

Expand Down

0 comments on commit de33e4f

Please sign in to comment.