Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Xpyder opened this Issue Sep 25, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@Xpyder
Copy link

Xpyder commented Sep 25, 2018

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

@sfackler sfackler added the T-doc label Sep 25, 2018

@shepmaster shepmaster changed the title [easy][documentation] a line in std::io::Seek is confusing for some people std::io::Seek's documentation about seeking beyond the end of a stream is confusing Sep 25, 2018

@Xpyder

This comment has been minimized.

Copy link
Author

Xpyder commented Sep 25, 2018

Thanks @shepmaster, I know other projects I've worked with have Easy and Documentation as tags so I wasn't sure if you guys might do the same

@shepmaster shepmaster added the E-easy label Sep 25, 2018

@shepmaster

This comment has been minimized.

Copy link
Member

shepmaster commented Sep 25, 2018

Yep, they're just actual labels over on the right ;-) (I also tabbed away and forgot to put the easy label on immediately 😊)

@cuviper

This comment has been minimized.

Copy link
Member

cuviper commented Sep 25, 2018

wasted some people's time

Don't worry about that! It's very easy for developers to misjudge whether such descriptions will make sense to the target users. Pointing these things out is a great way to contribute to documentation.

neoeinstein added a commit to neoeinstein/rust that referenced this issue Sep 28, 2018

kennytm added a commit to kennytm/rust that referenced this issue Sep 29, 2018

kennytm added a commit to kennytm/rust that referenced this issue Sep 29, 2018

@bors bors closed this in #54635 Sep 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.