From cc1f57b4bf31604feb0789be6c13af071311b4e0 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Sat, 10 Apr 2021 23:42:40 -0700 Subject: [PATCH] Fix unused import on windows --- cursive/src/backends/crossterm.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cursive/src/backends/crossterm.rs b/cursive/src/backends/crossterm.rs index 06b650d..aafbb7d 100644 --- a/cursive/src/backends/crossterm.rs +++ b/cursive/src/backends/crossterm.rs @@ -6,7 +6,6 @@ use std::{ cell::{Cell, RefCell, RefMut}, - fs::File, io::{self, BufWriter, Write}, time::Duration, }; @@ -42,7 +41,7 @@ use crate::{ type Stdout = io::Stdout; #[cfg(unix)] -type Stdout = File; +type Stdout = std::fs::File; /// Backend using crossterm pub struct Backend { @@ -205,7 +204,8 @@ impl Backend { )?; #[cfg(unix)] - let stdout = RefCell::new(BufWriter::new(File::create("/dev/tty")?)); + let stdout = + RefCell::new(BufWriter::new(std::fs::File::create("/dev/tty")?)); #[cfg(windows)] let stdout = RefCell::new(BufWriter::new(io::stdout()));