mocword
mocword copied to clipboard
`cargo install` fails with compilation error
$cargo install mocword
error[E0277]: expected a `Fn<(char,)>` closure, found `[char; 2]`
--> /usr/local/google/home/cnieves/.cargo/registry/src/github.com-1ecc6299db9ec823/mocword-0.1.0/src/main.rs:312:56
|
312 | execute(conn, &args, line.trim_end_matches(&['\r', '\n']))?.join(" ")
| ---------------- ^^^^^^^^^^^^^ expected an `Fn<(char,)>` closure, found `[char; 2]`
| |
| required by a bound introduced by this call
|
= help: the trait `Fn<(char,)>` is not implemented for `[char; 2]`
= note: required because of the requirements on the impl of `FnOnce<(char,)>` for `&[char; 2]`
= note: required because of the requirements on the impl of `Pattern<'_>` for `&[char; 2]`
For more information about this error, try `rustc --explain E0277`.
@squk Could you tell me your environment (OS, cargo, rustc versions)? I can't reproduce this error in my environment.