We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
unwrap_or_default
String
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
Clippy accepts this atm:
empty_string.unwrap_or_else(|| "".to_string());
It should suggest unwrap_or_default for this case, which is more concise:
empty_string.unwrap_or_default();
No response
@rustbot claim
The text was updated successfully, but these errors were encountered:
"".to_string
7babd1b
xphoniex
Successfully merging a pull request may close this issue.
Description
Clippy accepts this atm:
It should suggest
unwrap_or_default
for this case, which is more concise:Version
No response
Additional Labels
@rustbot claim
The text was updated successfully, but these errors were encountered: