Concrete issue
The sample code in the WebSocket documentation uses incorrect trait and method names in several places.
WebsocketController is misnamed as Websocket in its use declaration, although it's named correctly in the rest of the code.
client_connected is misnamed as handle_connection.
client_message is misnamed as handle_message.
Underlying causes
- I'm confused about how these errors happened, because
WebsocketController has had the same trait name and method names since it was introduced in commit 8b45eb1. An explanation would help me use and potentially debug the rest of the documentation. In case it's helpful, the errors appeared in commit ee4e6d0.
- Validating that sample code compiles would've caught these errors. I''ve opened a feature request for that.
Concrete issue
The sample code in the WebSocket documentation uses incorrect trait and method names in several places.
WebsocketControlleris misnamed asWebsocketin itsusedeclaration, although it's named correctly in the rest of the code.client_connectedis misnamed ashandle_connection.client_messageis misnamed ashandle_message.Underlying causes
WebsocketControllerhas had the same trait name and method names since it was introduced in commit 8b45eb1. An explanation would help me use and potentially debug the rest of the documentation. In case it's helpful, the errors appeared in commit ee4e6d0.