-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Improve documentation for str::replace() and str::replacen() #109598
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
Conversation
Currently, to know what the function will return when the pattern doesn't match, the docs require the reader to understand the implementation detail and mentally evaluate or run the example code. It is not immediately clear. This PR makes it more explicit so the reader can quickly find the information.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thomcc (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Hm, sure. I think this is pretty obvious but it doesn't hurt to be clear. @bors r+ rollup |
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#109598 (Improve documentation for str::replace() and str::replacen()) - rust-lang#109779 (Update gccjit and remove libc 0.1 dependency) - rust-lang#109784 (Refactor glibc time64 support, riscv32 always has 64-bit `time_t`) - rust-lang#109793 (add comment to `impl !Error for &str`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Currently, to know what the function will return when the pattern doesn't match, the docs require the reader to understand the implementation detail and mentally evaluate or run the example code. It is not immediately clear.
This PR makes it more explicit so the reader can quickly find the information.