diff options
| author | mo8it <mo8it@proton.me> | 2024-04-07 19:01:08 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-04-07 19:01:08 +0200 |
| commit | 3bd26c7a24a97f9b4b87c453fbdbb06fe9971920 (patch) | |
| tree | b8cd9d7d0f23d69f260d8ec48e721d0c4b858faa /src/watch.rs | |
| parent | 8c31d38fa17970d0d2dc696922eb8cb329a6fdb9 (diff) | |
State -> StateFile
Diffstat (limited to 'src/watch.rs')
| -rw-r--r-- | src/watch.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/watch.rs b/src/watch.rs index cc9668d..1503fdf 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -18,7 +18,7 @@ use std::{ use crate::{ exercise::{self, Exercise}, - state::State, + state_file::StateFile, }; enum Event { @@ -151,14 +151,14 @@ You can keep working on this exercise or jump into the next one by removing the } } -pub fn watch(state: &State, exercises: &[Exercise]) -> Result<()> { +pub fn watch(state_file: &StateFile, exercises: &[Exercise]) -> Result<()> { let (tx, rx) = channel(); let mut debouncer = new_debouncer(Duration::from_secs(1), tx)?; debouncer .watcher() .watch(Path::new("exercises"), RecursiveMode::Recursive)?; - let current_exercise_ind = state.next_exercise_ind(); + let current_exercise_ind = state_file.next_exercise_ind(); let exercise = &exercises[current_exercise_ind]; |
