Closed
Description
Sorry, I don't exactly understand why this happened, so I can't provide much more detail.
error[E0277]: expected a `std::ops::Fn<(char,)>` closure, found `char`
--> hglfgp_glsl/src/lib.rs:21:42
|
21 | s.chars().filter(|c| !(" \n\t".contains(c))).collect::<String>()
| ^ expected an `Fn<(char,)>` closure, found `char`
The correct solution to fix this was to change |c|
to |&c|
, however the error message did not indicate what was wrong at all.
Please inform me if I need to change the format of this issue.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Trait systemCategory: An issue proposing an enhancement or a PR with one.Diagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint; hard to understand for new users.Relevant to the compiler team, which will review and decide on the PR/issue.