Skip to content

std::io::Seek's documentation about seeking beyond the end of a stream is confusing #54562

Closed
@Xpyder

Description

@Xpyder

https://doc.rust-lang.org/std/io/trait.Seek.html
std::io::Seek

I got confused by this line and wasted some people's time over on internals.rust

A seek beyond the end of a stream is allowed, but implementation defined.

so after a little discussion it seems like this might be better wording for those of us who are silly

A seek beyond the end of a stream is allowed, but it is implementation-defined.

The hyphen makes it clear “implementation defined” is a known concept (and matches it’s usage elsewhere) and the “it is” makes it a bit more clear that the full sentence is considered and intentional.

While normally I find brevity improves clarity, in this case if you don’t realize “implementation defined” is a single concept, it sounds like a thought that trailed off after an edit

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions