Skip to content

Correct trait and method names in WebSocket documentation #77

Description

@Vectornaut

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocsDocumentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions