Skip to content

I can't install #19

Description

@IvelOt

OS: Arch Linux x86_64
Kernel: Linux 6.18.24-1-
CPU: 12th Gen Intel(R) Core(TM) i5-1235U (12) @ 4.40 GHz
Rust: rustc 1.94.1 (e408947bf 2026-03-25)
Cargo: cargo 1.94.1 (29ea6fb6a 2026-03-24)

error on install:

cargo install leetcode-tui-rs
    Updating crates.io index
...
   Compiling kdam v0.4.1
   Compiling leetcode-tui-rs v0.5.2
error[E0277]: the trait bound `Text<'_>: From<ratatui_core::text::text::Text<'_>>` is not satisfied
   --> /home/ivelot/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/leetcode-tui-rs-0.5.2/src/widgets/popup.rs:91:24
    |
 91 |         Paragraph::new(text)
    |         -------------- ^^^^ the trait `From<ratatui_core::text::text::Text<'_>>` is not implemented for `Text<'_>`
    |         |
    |         required by a bound introduced by this call
    |
    = help: the following other types implement trait `From<T>`:
              `Text<'_>` implements `From<&Masked<'_>>`
              `Text<'_>` implements `From<&str>`
              `Text<'_>` implements `From<Cow<'_, str>>`
              `Text<'_>` implements `From<Masked<'_>>`
              `Text<'_>` implements `From<String>`
              `Text<'_>` implements `From<Vec<ratatui::prelude::Line<'_>>>`
              `Text<'_>` implements `From<ratatui::prelude::Line<'_>>`
              `Text<'_>` implements `From<ratatui::prelude::Span<'_>>`
    = note: required for `ratatui_core::text::text::Text<'_>` to implement `Into<Text<'_>>`
note: required by a bound in `ratatui::widgets::Paragraph::<'a>::new`
   --> /home/ivelot/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ratatui-0.29.0/src/widgets/paragraph.rs:168:12
    |
166 |     pub fn new<T>(text: T) -> Self
    |            --- required by a bound in this associated function
167 |     where
168 |         T: Into<Text<'a>>,
    |            ^^^^^^^^^^^^^^ required by this bound in `Paragraph::<'a>::new`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `leetcode-tui-rs` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `leetcode-tui-rs v0.5.2`, intermediate artifacts can be found at `/tmp/cargo-installYXztlR`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions