chore: bump ratatui version

This commit is contained in:
Kristofers Solo 2026-01-01 03:56:02 +02:00
parent d352c95221
commit 3bbb1459f2
Signed by: kristoferssolo
GPG Key ID: 8687F2D3EEE6F0ED
3 changed files with 729 additions and 119 deletions

836
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@ crossterm = "0.29"
derive_more = { version = "2.1", features = ["display"] }
dirs = "6.0"
merge = "0.2"
ratatui = { version = "0.29" }
ratatui = { version = "0.30" }
serde = { version = "1.0", features = ["derive"] }
thiserror = "2.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "fs"] }

View File

@ -27,14 +27,16 @@ impl<B: Backend> Tui<B> {
pub const fn new(terminal: Terminal<B>, events: EventHandler) -> Self {
Self { terminal, events }
}
}
impl<B: Backend<Error: Send + Sync + 'static>> Tui<B> {
/// Initializes the terminal interface.
///
/// It enables the raw mode and sets terminal properties.
///
/// # Errors
///
/// TODO: add error types
/// Returns an error if terminal initialization fails.
pub fn init(&mut self) -> Result<()> {
terminal::enable_raw_mode()?;
crossterm::execute!(io::stderr(), EnterAlternateScreen, EnableMouseCapture)?;
@ -63,7 +65,7 @@ impl<B: Backend> Tui<B> {
///
/// # Errors
///
/// TODO: add error types
/// Returns an error if drawing fails.
pub fn draw(&mut self, app: &mut App) -> Result<()> {
self.terminal.draw(|frame| ui::render(app, frame))?;
Ok(())
@ -76,7 +78,7 @@ impl<B: Backend> Tui<B> {
///
/// # Errors
///
/// TODO: add error types
/// Returns an error if terminal reset fails.
fn reset() -> Result<()> {
terminal::disable_raw_mode()?;
crossterm::execute!(io::stdout(), LeaveAlternateScreen, DisableMouseCapture)?;
@ -89,7 +91,7 @@ impl<B: Backend> Tui<B> {
///
/// # Errors
///
/// TODO: add error types
/// Returns an error if terminal cleanup fails.
pub fn exit(&mut self) -> Result<()> {
Self::reset()?;
self.terminal.show_cursor()?;