You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However I am not able to build the project when running cargo install stu. It gives me the following error:
Compiling stu v0.5.0
error[E0277]: a value of type`Vec<ratatui::text::Line<'_>>` cannot be built from an iterator over elements of type `ratatui::text::line::Line<'_>`
--> /home/tmeijn/.local/share/mise/installs/rust/1.78.0/registry/src/index.crates.io-6f17d22bba15001f/stu-0.5.0/src/widget/text_preview.rs:81:51
|
81 |Ok(s.into_text().unwrap().into_iter().collect())
| ^^^^^^^ value of type`Vec<ratatui::text::Line<'_>>` cannot be built from `std::iter::Iterator<Item=ratatui::text::line::Line<'_>>`|
= help: the trait `FromIterator<ratatui::text::line::Line<'_>>` is not implemented for `Vec<ratatui::text::Line<'_>>`
= help: the trait `FromIterator<ratatui::text::Line<'_>>` is implemented for `Vec<ratatui::text::Line<'_>>`
= help: for that trait implementation, expected `ratatui::text::Line<'_>`, found `ratatui::text::line::Line<'_>`
note: the method call chain might not have had the expected associated types
--> /home/tmeijn/.local/share/mise/installs/rust/1.78.0/registry/src/index.crates.io-6f17d22bba15001f/stu-0.5.0/src/widget/text_preview.rs:74:18
|
73 |let s = LinesWithEndings::from(s)
| ------------------------- this expression has type`LinesWithEndings<'_>`74 | .map(|line| { | __________________^75 | | let ranges: Vec<(syntect::highlighting::Style, &str)> =76 | | h.highlight_line(line, &SYNTAX_SET).unwrap();77 | | as_24_bit_terminal_escaped(&ranges[..], false)78 | | }) | |__________________^ `Iterator::Item` is `String` here...81 | Ok(s.into_text().unwrap().into_iter().collect()) | ----------- `Iterator::Item` is `Line<'_>` here
note: required by a bound in`collect`
--> /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/traits/iterator.rs:1999:5
help: consider removing this method call, as the receiver has type`ratatui::text::text::Text<'_>` and `ratatui::text::text::Text<'_>: FromIterator<ratatui::text::line::Line<'_>>` trivially holds |81 - Ok(s.into_text().unwrap().into_iter().collect())81 + Ok(s.into_text().unwrap().collect()) |For more information about this error, try `rustc --explain E0277`.error: could not compile `stu` (bin "stu") due to 1 previous errorerror: failed to compile `stu v0.5.0`, intermediate artifacts can be found at `/tmp/cargo-installJJEe4L`.To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
The text was updated successfully, but these errors were encountered:
Hey, came across this project from https://terminaltrove.com
However I am not able to build the project when running
cargo install stu
. It gives me the following error:The text was updated successfully, but these errors were encountered: