Skip to content

TcpListener docs example contains an explicit drop that can never be reached #35950

Closed
@sfackler

Description

@sfackler

The incoming iterator never returns None, so the drop at the end will never be reached. The explicit matching against the socket result also seems potentially nonconventional docs-wise?

https://doc.rust-lang.org/std/net/struct.TcpListener.html#examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions