`
use color_eyre::Result;
use crossterm::event::{self, Event, KeyCode, KeyEvent, KeyEventKind, KeyModifiers};
use ratatui::{
style::Stylize,
text::Line,
widgets::{Block, Paragraph},
DefaultTerminal, Frame,
};
use ratatui_explorer::{FileExplorer, Theme};
....
// Render the file explorer widget.
terminal.draw(|f| {
f.render_widget(&file_explorer.widget(), f.size()); // this line can't be compiled
})?;
....
`
the information is :
error[E0277]: the trait bound&impl ratatui::widgets::WidgetRef + '_: Widget` is not satisfied
--> src/app.rs:61:30
61
frame.render_widget(&widget,frame.area());
------------- ^^^^^^ the trait WidgetRef is not implemented for impl ratatui::widgets::WidgetRef + '_, which is required by &impl ratatui::widgets::WidgetRef + '_: Widget
required by a bound introduced by this call
`
and my environment is:
rustc version: rustc 1.81.0 (eeb90cda1 2024-09-04) (Homebrew)
cargo version: 1.81.0
` use color_eyre::Result; use crossterm::event::{self, Event, KeyCode, KeyEvent, KeyEventKind, KeyModifiers}; use ratatui::{ style::Stylize, text::Line, widgets::{Block, Paragraph}, DefaultTerminal, Frame, };
use ratatui_explorer::{FileExplorer, Theme};
....
// Render the file explorer widget. terminal.draw(|f| { f.render_widget(&file_explorer.widget(), f.size()); // this line can't be compiled })?;
.... ` the information is :
error[E0277]: the trait bound
&impl ratatui::widgets::WidgetRef + '_: Widget` is not satisfied --> src/app.rs:61:30WidgetRef
is not implemented forimpl ratatui::widgets::WidgetRef + '_
, which is required by&impl ratatui::widgets::WidgetRef + '_: Widget
`
and my environment is: rustc version: rustc 1.81.0 (eeb90cda1 2024-09-04) (Homebrew) cargo version: 1.81.0
[dependencies] crossterm = "0.28.1" ratatui = { version = "0.28.1",features = ["unstable-widget-ref"] } color-eyre = "0.6.3" ratatui-explorer = "0.1.1"
then I use your examples,the result also is like above . thanks.