diff options
| author | mo8it <mo8it@proton.me> | 2024-04-14 02:41:19 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-04-14 02:41:19 +0200 |
| commit | bee62c89de09fdd9823cba81e07f0f8528fe8ef9 (patch) | |
| tree | bca32899b02862936905ed84624ebd3af2b0e691 /src/watch | |
| parent | 5c0073a9485c4226e58b657cb49628919a28a942 (diff) | |
Add terminal links
Diffstat (limited to 'src/watch')
| -rw-r--r-- | src/watch/notify_event.rs | 4 | ||||
| -rw-r--r-- | src/watch/state.rs | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/watch/notify_event.rs b/src/watch/notify_event.rs index 0c8d669..fb9a8c0 100644 --- a/src/watch/notify_event.rs +++ b/src/watch/notify_event.rs @@ -1,11 +1,11 @@ use notify_debouncer_mini::{DebounceEventResult, DebouncedEventKind}; -use std::{path::Path, sync::mpsc::Sender}; +use std::sync::mpsc::Sender; use super::WatchEvent; pub struct DebounceEventHandler { pub tx: Sender<WatchEvent>, - pub exercise_paths: &'static [&'static Path], + pub exercise_paths: &'static [&'static str], } impl notify_debouncer_mini::DebounceEventHandler for DebounceEventHandler { diff --git a/src/watch/state.rs b/src/watch/state.rs index 6a97637..1a79573 100644 --- a/src/watch/state.rs +++ b/src/watch/state.rs @@ -136,11 +136,7 @@ When you are done experimenting, enter `n` or `next` to go to the next exercise )?; self.writer.write_fmt(format_args!( "{progress_bar}Current exercise: {}\n", - self.app_state - .current_exercise() - .path - .to_string_lossy() - .bold(), + self.app_state.current_exercise().terminal_link(), ))?; self.show_prompt()?; |
