-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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::env::SplitPaths does not document its Item type #59543
Comments
@brettcannon If you unfold I do think it would be nice if some extra text on |
@DevQps since I didn't even think of expanding As I said, if this is deemed reasonable I'm happy to do the PR to add the change. |
@brettcannon That would be great! Let us know what you come up with! |
Previously there wasn't any documentation to show what the type of `Item` was inside `std::env::SplitPaths`. Now, in the same format as other examples of docs in `srd` for `Iterator#Item`, we mention the type. This fixes rust-lang#59543.
Looks like someone snagged fixing this before I had a chance to get to it, so I'll let #60022 and its author handle fixing this. |
@brettcannon Nice :) Let's wait for that then :) |
Document `Item` type in `std::env::SplitPaths` iterator. Previously there wasn't any documentation to show what the type of `Item` was inside `std::env::SplitPaths`. Now, in the same format as other examples of docs in `std` for `Iterator#Item`, we mention the type. This fixes rust-lang#59543. r? @steveklabnik
Reading both https://doc.rust-lang.org/std/env/struct.SplitPaths.html and https://doc.rust-lang.org/std/env/fn.split_paths.html there's no specification that the
Item
type for the iterator isPathBuf
. To me it seemed ambiguous what an "iterator that splits an environment variable into paths" or "an iterator over the paths" returns since it could be the string representing the paths -- which isOsStr
-- or an actualPath
object.I'm happy to submit a PR if this is makes sense enough to fix (since according #30093 it used to specify this detail and now it doesn't with a quick perusal of https://github.com/rust-lang/rust/blame/master/src/libstd/env.rs not turning up anything obvious as to why the change).
The text was updated successfully, but these errors were encountered: