Skip to content

The Path::join method is not very discoverable #106219

New issue

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

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

Already on GitHub? # to your account

Closed
albertlarsan68 opened this issue Dec 28, 2022 · 1 comment · Fixed by #106280
Closed

The Path::join method is not very discoverable #106219

albertlarsan68 opened this issue Dec 28, 2022 · 1 comment · Fixed by #106280
Assignees
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@albertlarsan68
Copy link
Member

albertlarsan68 commented Dec 28, 2022

Location

std::path::PathBuf::push()'s docs

Summary

There should be a link to the std::path::Path::join() method. It is a method that is already linked in the other way, and can reduce the likelihood of things like

-    let stamp_file = {
-        let mut s = build.out.clone();
-        s.push("rustfmt.stamp");
-        s
-    };
+    let stamp_file = build.out.join("rustfmt.stamp");

happening.

@albertlarsan68 albertlarsan68 added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Dec 28, 2022
@jyn514 jyn514 added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 28, 2022
@Ezrashaw
Copy link
Contributor

@rustbot claim

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants