Skip to content

Commit dfc67e5

Browse files
authoredApr 23, 2023
Fix interactive-demo (crossterm-rs#783)
1 parent 769b181 commit dfc67e5

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed
 

‎examples/interactive-demo/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub fn read_char() -> std::io::Result<char> {
9494
}
9595
}
9696

97-
pub fn buffer_size() -> io::Result<(u16> {
97+
pub fn buffer_size() -> io::Result<(u16, u16)> {
9898
terminal::size()
9999
}
100100

‎examples/interactive-demo/src/test/attribute.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ const ATTRIBUTES: [(style::Attribute, style::Attribute); 10] = [
77
(style::Attribute::Bold, style::Attribute::NormalIntensity),
88
(style::Attribute::Italic, style::Attribute::NoItalic),
99
(style::Attribute::Underlined, style::Attribute::NoUnderline),
10-
11-
(style::Attribute::DoubleUnderlined, style::Attribute::NoUnderline),
10+
(
11+
style::Attribute::DoubleUnderlined,
12+
style::Attribute::NoUnderline,
13+
),
1214
(style::Attribute::Undercurled, style::Attribute::NoUnderline),
1315
(style::Attribute::Underdotted, style::Attribute::NoUnderline),
1416
(style::Attribute::Underdashed, style::Attribute::NoUnderline),

‎examples/interactive-demo/src/test/color.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(clippy::cognitive_complexity)]
22

3-
use crate::Result;
43
use crossterm::{cursor, queue, style, style::Color};
54
use std::io::Write;
65

‎examples/interactive-demo/src/test/cursor.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use std::io::Write;
44

5-
use crossterm::{cursor, execute, queue, style, Command, style::Stylize};
5+
use crossterm::{cursor, execute, queue, style, style::Stylize, Command};
66
use std::thread;
77
use std::time::Duration;
88

@@ -109,7 +109,6 @@ where
109109
)
110110
}
111111

112-
113112
fn test_move_cursor_to<W>(w: &mut W) -> std::io::Result<()>
114113
where
115114
W: Write,
@@ -171,7 +170,7 @@ where
171170
queue!(
172171
w,
173172
cursor::MoveTo(column, row),
174-
style::PrintStyledContent("▓".red()),
173+
style::PrintStyledContent("▓".red()),
175174
)?;
176175
} else {
177176
queue!(

‎examples/interactive-demo/src/test/event.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crossterm::{
55
event::{read, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
66
execute,
77
};
8-
use std::io;
8+
use std::io::{self, Write};
99

1010
fn test_event<W>(w: &mut W) -> io::Result<()>
1111
where

0 commit comments

Comments
 (0)
Please sign in to comment.