jesseduffield / lazycli

Turn static CLI commands into TUIs with ease

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error[E0277]: the trait bound ... --> src/ui/

toddyamakawa opened this issue · comments

I'm seeing an error when I try to build lazycli. I don't know Rust at all.

Rust version: rustc 1.43.1 (8d69840ab 2020-05-04)
Cargo command: cargo install --git --verbose

Error message:

error[E0277]: the trait bound `std::vec::Vec<tui::layout::Constraint>: std::convert::From<[tui::layout::Constraint; 3]>` is not satisfied
  --> src/ui/
62 |         .constraints([
   |          ^^^^^^^^^^^ the trait `std::convert::From<[tui::layout::Constraint; 3]>` is not implemented for `std::vec::Vec<tui::layout::Constraint>`
   = help: the following implementations were found:
             <std::vec::Vec<T> as std::convert::From<&[T]>>
             <std::vec::Vec<T> as std::convert::From<&mut [T]>>
             <std::vec::Vec<T> as std::convert::From<std::borrow::Cow<'a, [T]>>>
             <std::vec::Vec<T> as std::convert::From<std::boxed::Box<[T]>>>
           and 5 others
   = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<tui::layout::Constraint>>` for `[tui::layout::Constraint; 3]`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: failed to compile `lazycli v0.1.14 (`, intermediate artifacts can be found at `/tmp/cargo-installmQuRvH`

Caused by:
  could not compile `lazycli`.

Caused by:
  process didn't exit successfully: `rustc --crate-name lazycli --edition=2018 src/ --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=641deed7a2de3b28 -C extra-filename=-641deed7a2de3b28 --out-dir /tmp/cargo-installmQuRvH/release/deps -L dependency=/tmp/cargo-installmQuRvH/release/deps --extern clap=/tmp/cargo-installmQuRvH/release/deps/libclap-dc7b4d1fc59537f9.rlib --extern crossterm=/tmp/cargo-installmQuRvH/release/deps/libcrossterm-1bc56029921d54d6.rlib --extern directories=/tmp/cargo-installmQuRvH/release/deps/libdirectories-5958782e7f9edfea.rlib --extern regex=/tmp/cargo-installmQuRvH/release/deps/libregex-2fe96743b173e2a1.rlib --extern serde=/tmp/cargo-installmQuRvH/release/deps/libserde-e57fc93ae4eeb771.rlib --extern serde_yaml=/tmp/cargo-installmQuRvH/release/deps/libserde_yaml-a4f8433055b73ece.rlib --extern ticker=/tmp/cargo-installmQuRvH/release/deps/libticker-36944b801d7aa26c.rlib --extern tui=/tmp/cargo-installmQuRvH/release/deps/libtui-6833afb078b918e4.rlib` (exit code: 1)

@toddyamakawa could you see if using version rustc 1.51.0-nightly (44e3daf5e 2020-12-31) solves the issue?

I've updated the readme to include using the '--locked' flag so that the lockfile is used. I'll close this off but can reopen if the issue remains

ezoic increase your site revenue