-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Mention ToString in std::fmt docs #57195
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
Mention ToString in std::fmt docs #57195
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Seems right to me; but since this affects conventions I'm randomly reassigning to someone from T-Libs: r? @SimonSapin |
Seems uncontroversial to me, but to nit-pick I’d tweak the wording as: “To convert a single value to a string with the default formatting, use the |
I reworded it to "To convert a single value to a string, use the [ |
Looks good, thanks! @bors r+ |
📌 Commit 0637bd5023cc6353debd2b7271e746c4c93d4ed0 has been approved by |
@SimonSapin should I squash these? |
If you want to, feel free and I’ll r+ again. The test suites should pass either way, which is already a nice-to-have and not a true requirement as far as I know. |
0637bd5
to
56d6ff0
Compare
@bors r+ |
📌 Commit 56d6ff0 has been approved by |
…imonSapin Mention ToString in std::fmt docs I believe this should be added because `x.to_string()` is preferred over `format!("{}", x)` as the recommended way to convert a value to a string. `std::fmt` and the `format` macro is where people look for documentation about this, and thus we should include references to this preferred functions there. Resolves #55065
☀️ Test successful - status-appveyor, status-travis |
I believe this should be added because
x.to_string()
is preferred overformat!("{}", x)
as the recommended way to convert a value to a string.std::fmt
and theformat
macro is where people look for documentation about this, and thus we should include references to this preferred functions there.Resolves #55065