Fix interactive-demo (#783)
This commit is contained in:
parent
769b18151c
commit
dfc67e54c8
@ -94,7 +94,7 @@ pub fn read_char() -> std::io::Result<char> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn buffer_size() -> io::Result<(u16> {
|
||||
pub fn buffer_size() -> io::Result<(u16, u16)> {
|
||||
terminal::size()
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,10 @@ const ATTRIBUTES: [(style::Attribute, style::Attribute); 10] = [
|
||||
(style::Attribute::Bold, style::Attribute::NormalIntensity),
|
||||
(style::Attribute::Italic, style::Attribute::NoItalic),
|
||||
(style::Attribute::Underlined, style::Attribute::NoUnderline),
|
||||
|
||||
(style::Attribute::DoubleUnderlined, style::Attribute::NoUnderline),
|
||||
(
|
||||
style::Attribute::DoubleUnderlined,
|
||||
style::Attribute::NoUnderline,
|
||||
),
|
||||
(style::Attribute::Undercurled, style::Attribute::NoUnderline),
|
||||
(style::Attribute::Underdotted, style::Attribute::NoUnderline),
|
||||
(style::Attribute::Underdashed, style::Attribute::NoUnderline),
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![allow(clippy::cognitive_complexity)]
|
||||
|
||||
use crate::Result;
|
||||
use crossterm::{cursor, queue, style, style::Color};
|
||||
use std::io::Write;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use std::io::Write;
|
||||
|
||||
use crossterm::{cursor, execute, queue, style, Command, style::Stylize};
|
||||
use crossterm::{cursor, execute, queue, style, style::Stylize, Command};
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
@ -109,7 +109,6 @@ where
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
fn test_move_cursor_to<W>(w: &mut W) -> std::io::Result<()>
|
||||
where
|
||||
W: Write,
|
||||
|
@ -5,7 +5,7 @@ use crossterm::{
|
||||
event::{read, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
|
||||
execute,
|
||||
};
|
||||
use std::io;
|
||||
use std::io::{self, Write};
|
||||
|
||||
fn test_event<W>(w: &mut W) -> io::Result<()>
|
||||
where
|
||||
|
Loading…
Reference in New Issue
Block a user