diff options
author | extrawurst <mail@rusticorn.com> | 2024-02-20 14:59:33 +0100 |
---|---|---|
committer | extrawurst <776816+extrawurst@users.noreply.github.com> | 2024-02-20 15:41:31 +0100 |
commit | 2b39c6465aa01b06600040053fe3086f92590692 (patch) | |
tree | a02c7fe9ac73c97bf2bc70d97b8aef2a4516db77 /src/spinner.rs | |
parent | 45c34e5675e83285f99db77309dd1c6b78fc245f (diff) |
ratatui 0.24 update
Diffstat (limited to 'src/spinner.rs')
-rw-r--r-- | src/spinner.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/spinner.rs b/src/spinner.rs index a3a164b1..2fc6b3a2 100644 --- a/src/spinner.rs +++ b/src/spinner.rs @@ -1,4 +1,7 @@ -use ratatui::{backend::Backend, Terminal}; +use ratatui::{ + backend::{Backend, CrosstermBackend}, + Terminal, +}; use std::{cell::Cell, char, io}; // static SPINNER_CHARS: &[char] = &['◢', '◣', '◤', '◥']; @@ -36,9 +39,9 @@ impl Spinner { } /// draws or removes spinner char depending on `pending` state - pub fn draw<B: Backend>( + pub fn draw( &self, - terminal: &mut Terminal<B>, + terminal: &mut Terminal<CrosstermBackend<io::Stdout>>, ) -> io::Result<()> { let idx = self.idx; @@ -56,7 +59,7 @@ impl Spinner { .backend_mut() .draw(vec![(0_u16, 0_u16, &c)].into_iter())?; - ratatui::backend::Backend::flush(terminal.backend_mut())?; + Backend::flush(terminal.backend_mut())?; } Ok(()) |