summaryrefslogtreecommitdiff
path: root/src/watch
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2025-02-18 20:10:52 +0100
committermo8it <mo8it@proton.me>2025-02-18 20:10:52 +0100
commitd9872f2615a11ce94deb85c8f1c215d69abd7992 (patch)
treea525e7eaac10e75db45921f79578d3da33bf1a13 /src/watch
parent298be671b9108e490fcef6b8febace8659ec710a (diff)
Upgrade to edition 2024
Diffstat (limited to 'src/watch')
-rw-r--r--src/watch/notify_event.rs6
-rw-r--r--src/watch/state.rs9
-rw-r--r--src/watch/terminal_event.rs2
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,