Fix interactive-demo (#783)

This commit is contained in:
José Luis Cruz 2023-04-23 12:41:00 +02:00 committed by GitHub
parent 769b18151c
commit dfc67e54c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View File

@ -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()
}

View File

@ -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),

View File

@ -1,6 +1,5 @@
#![allow(clippy::cognitive_complexity)]
use crate::Result;
use crossterm::{cursor, queue, style, style::Color};
use std::io::Write;

View File

@ -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,
@ -171,7 +170,7 @@ where
queue!(
w,
cursor::MoveTo(column, row),
style::PrintStyledContent("".red()),
style::PrintStyledContent("".red()),
)?;
} else {
queue!(

View File

@ -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