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

mark most of std::str methods as #[must_use] #50479

Closed

Conversation

frol
Copy link
Contributor

@frol frol commented May 6, 2018

I have recently noticed #50117 and realized that most of the methods in std::str should be annotated with #[must_use]. I have even accidentally noticed a wrong use of .to_lowercase() in one of a recent Reddit answers, which proves that it is worthwhile to warn users about incorrect usage.

P.S. It seems that there is a need to annotate quite a lot of functions. Is there a plan to do that?

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 6, 2018
@frol
Copy link
Contributor Author

frol commented May 6, 2018

Oh, this seems to be a duplicate of #50462 now (it is my first-time contribution and I checked for existing PRs when that one didn't exist yet, sorry).

@frol frol closed this May 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants