Skip to content

Commit 2c18768

Browse files
authored
fix: fmt (#969)
1 parent e063091 commit 2c18768

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples/event-read-char-line.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
66
use std::io;
77

8-
use crossterm::{event::{self, Event, KeyCode, KeyEvent, KeyEventKind}, terminal};
8+
use crossterm::{
9+
event::{self, Event, KeyCode, KeyEvent, KeyEventKind},
10+
terminal,
11+
};
912

1013
pub fn read_char() -> io::Result<char> {
1114
loop {
@@ -23,11 +26,12 @@ pub fn read_char() -> io::Result<char> {
2326
pub fn read_line() -> io::Result<String> {
2427
let mut line = String::new();
2528
loop {
26-
if let Event::Key(KeyEvent{
29+
if let Event::Key(KeyEvent {
2730
code,
2831
kind: KeyEventKind::Press,
2932
..
30-
}) = event::read()? {
33+
}) = event::read()?
34+
{
3135
match code {
3236
KeyCode::Enter => {
3337
break;

0 commit comments

Comments
 (0)