Repository: seanmonstar/warp (language: rust)

Issue:
Outdated documentation on websocket Message
[`warp::filters::ws::Message`](https://docs.rs/warp/0.2.3/warp/filters/ws/struct.Message.html) claims that it only represents `Text` or `Binary`, but the message can also be `Close`.

I thought this meant that `Close` from clients was handled internally, but this is not the case.


Discussion / hints:
Hi, yeah that line can be removed, want to submit a PR doing it?

Fix patch:
diff --git a/src/filters/ws.rs b/src/filters/ws.rs
index 4db0f2f1b..ec1389d16 100644
--- a/src/filters/ws.rs
+++ b/src/filters/ws.rs
@@ -164,6 +164,10 @@ where
 }
 
 /// A websocket `Stream` and `Sink`, provided to `ws` filters.
+///
+/// Ping messages sent from the client will be handled internally by replying with a Pong message.
+/// Close messages need to be handled explicitly: usually by closing the `Sink` end of the
+/// `WebSocket`.
 pub struct WebSocket {
     inner: WebSocketStream<hyper::upgrade::Upgraded>,
 }
@@ -249,8 +253,6 @@ impl fmt::Debug for WebSocket {
 
 /// A WebSocket message.
 ///
-/// Only repesents Text and Binary messages.
-///
 /// This will likely become a `non-exhaustive` enum in the future, once that
 /// language feature has stabilized.
 #[derive(Eq, PartialEq, Clone)]


Test patch: