From 2f481e3ecb830bc389171117cfcbd19dfa635321 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Tue, 6 Feb 2024 16:38:03 -0500 Subject: [PATCH] Bump termion to 3.0.0 --- cursive/Cargo.toml | 2 +- cursive/src/backends/termion.rs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cursive/Cargo.toml b/cursive/Cargo.toml index bae4b2bf..79365e4b 100644 --- a/cursive/Cargo.toml +++ b/cursive/Cargo.toml @@ -42,7 +42,7 @@ version = "0.17" [dependencies.termion] optional = true -version = "2" +version = "3" [dependencies.crossterm] optional = true diff --git a/cursive/src/backends/termion.rs b/cursive/src/backends/termion.rs index 9519d97a..236b0208 100644 --- a/cursive/src/backends/termion.rs +++ b/cursive/src/backends/termion.rs @@ -25,14 +25,14 @@ use crate::Vec2; use std::cell::{Cell, RefCell}; use std::fs::File; -use std::io::{BufWriter, Write}; +use std::io::Write; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; /// Backend using termion pub struct Backend { // Do we want to make this generic on the writer? - terminal: RefCell>>>>, + terminal: RefCell>>>, current_style: Cell, // Inner state required to parse input @@ -129,8 +129,7 @@ impl Backend { // Use a ~8MB buffer // Should be enough for a single screen most of the time. let terminal = RefCell::new( - MouseTerminal::from(BufWriter::with_capacity(8_000_000, output_file).into_raw_mode()?) - .into_alternate_screen()?, + MouseTerminal::from(output_file.into_raw_mode()?).into_alternate_screen()?, ); write!(terminal.borrow_mut(), "{}", termion::cursor::Hide)?;