Skip to content

TextArea doesn't implement Send with ratatui = "0.30.1" #27

Description

@acelot
use ratatui_textarea::TextArea;

pub struct ExampleWidget<'a> {
    some_text_area: TextArea<'a>,
}

fn assert_send<T: Send>() {}

fn check() {
    assert_send::<ExampleWidget>();
}

Code above works on ratatui = 0.30.0, and fails on 0.30.1:

error[E0277]: `(dyn CellEffect + 'static)` cannot be shared between threads safely
   --> src/ui/widget/test.rs:10:19
    |
 10 |     assert_send::<ExampleWidget>();
    |                   ^^^^^^^^^^^^^ `(dyn CellEffect + 'static)` cannot be shared between threads safely
    |
    = help: the trait `Sync` is not implemented for `(dyn CellEffect + 'static)`
    = note: required for `Arc<(dyn CellEffect + 'static)>` to implement `std::marker::Send`
note: required because it appears within the type `ratatui_widgets::block::shadow::Effect`

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions