We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I recently got the following message:
warning: use of `unwrap_or` followed by a function call --> jni-gen/src/generators/module.rs:17:24 | 17 | let modules_tree = modules | ________________________^ 18 | | .visit(|modules| { 19 | | let modules: HashMap<String, Option<String>> = modules; 20 | | let mut res: Vec<String> = vec![]; ... | 36 | | }) 37 | | .unwrap_or("// No modules".to_string()); | |_______________________________________________^ | = note: #[warn(or_fun_call)] on by default = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.180/index.html#or_fun_call help: try this | 17 | let modules_tree = modules 18 | .visit(|modules| { 19 | let modules: HashMap<String, Option<String>> = modules; 20 | let mut res: Vec<String> = vec![]; 21 | for (name, opt_rec_result) in modules { 22 | match opt_rec_result { ...
The issue is that the suggested change regarding unwrap_or is not shown.
unwrap_or
The text was updated successfully, but these errors were encountered:
I'm going to be looking at or_fun_call this coming weekend to implement #2338. I'll fix this then if the issue is still open.
or_fun_call
Sorry, something went wrong.
I fear this is something that needs to be fixed in rustc.
I believed this is fixed.
Yeah, the or_fun_call lint now has a much smaller suggestion span so this should indeed be fixed
No branches or pull requests
I recently got the following message:
The issue is that the suggested change regarding
unwrap_or
is not shown.The text was updated successfully, but these errors were encountered: