mocword icon indicating copy to clipboard operation
mocword copied to clipboard

`cargo install` fails with compilation error

Open squk opened this issue 2 years ago • 1 comments

$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 avatar Apr 18 '22 18:04 squk

@squk Could you tell me your environment (OS, cargo, rustc versions)? I can't reproduce this error in my environment.

high-moctane avatar Apr 19 '22 02:04 high-moctane