diff options
Diffstat (limited to 'src/watch')
| -rw-r--r-- | src/watch/notify_event.rs | 6 | ||||
| -rw-r--r-- | src/watch/state.rs | 9 | ||||
| -rw-r--r-- | src/watch/terminal_event.rs | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/watch/notify_event.rs b/src/watch/notify_event.rs index 2051e54..9c05f10 100644 --- a/src/watch/notify_event.rs +++ b/src/watch/notify_event.rs @@ -1,18 +1,18 @@ use anyhow::{Context, Result}; use notify::{ - event::{AccessKind, AccessMode, MetadataKind, ModifyKind, RenameMode}, Event, EventKind, + event::{AccessKind, AccessMode, MetadataKind, ModifyKind, RenameMode}, }; use std::{ sync::{ atomic::Ordering::Relaxed, - mpsc::{sync_channel, RecvTimeoutError, Sender, SyncSender}, + mpsc::{RecvTimeoutError, Sender, SyncSender, sync_channel}, }, thread, time::Duration, }; -use super::{WatchEvent, EXERCISE_RUNNING}; +use super::{EXERCISE_RUNNING, WatchEvent}; const DEBOUNCE_DURATION: Duration = Duration::from_millis(200); diff --git a/src/watch/state.rs b/src/watch/state.rs index 5263bc5..2413bec 100644 --- a/src/watch/state.rs +++ b/src/watch/state.rs @@ -1,24 +1,25 @@ use anyhow::{Context, Result}; use crossterm::{ + QueueableCommand, style::{ Attribute, Attributes, Color, ResetColor, SetAttribute, SetAttributes, SetForegroundColor, }, - terminal, QueueableCommand, + terminal, }; use std::{ io::{self, Read, StdoutLock, Write}, - sync::mpsc::{sync_channel, Sender, SyncSender}, + sync::mpsc::{Sender, SyncSender, sync_channel}, thread, }; use crate::{ app_state::{AppState, ExercisesProgress}, clear_terminal, - exercise::{solution_link_line, RunnableExercise, OUTPUT_CAPACITY}, + exercise::{OUTPUT_CAPACITY, RunnableExercise, solution_link_line}, term::progress_bar, }; -use super::{terminal_event::terminal_event_handler, InputPauseGuard, WatchEvent}; +use super::{InputPauseGuard, WatchEvent, terminal_event::terminal_event_handler}; const HEADING_ATTRIBUTES: Attributes = Attributes::none() .with(Attribute::Bold) diff --git a/src/watch/terminal_event.rs b/src/watch/terminal_event.rs index 48411db..2400a3d 100644 --- a/src/watch/terminal_event.rs +++ b/src/watch/terminal_event.rs @@ -4,7 +4,7 @@ use std::sync::{ mpsc::{Receiver, Sender}, }; -use super::{WatchEvent, EXERCISE_RUNNING}; +use super::{EXERCISE_RUNNING, WatchEvent}; pub enum InputEvent { Next, |
