From 2566f9aaf674458f6faff7e8aaf77bb108b7d56c Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 18 Apr 2024 11:31:08 +0200 Subject: [PATCH] Place mods under all imports --- src/list.rs | 4 ++-- src/main.rs | 4 ++-- src/watch.rs | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/list.rs b/src/list.rs index 2bb813d8..790c02fe 100644 --- a/src/list.rs +++ b/src/list.rs @@ -7,12 +7,12 @@ use crossterm::{ use ratatui::{backend::CrosstermBackend, Terminal}; use std::io; -mod state; - use crate::app_state::AppState; use self::state::{Filter, UiState}; +mod state; + pub fn list(app_state: &mut AppState) -> Result<()> { let mut stdout = io::stdout().lock(); stdout.execute(EnterAlternateScreen)?; diff --git a/src/main.rs b/src/main.rs index d40f978c..c8940af2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,6 +11,8 @@ use std::{ process::exit, }; +use self::{app_state::AppState, dev::DevCommands, info_file::InfoFile, watch::WatchExit}; + mod app_state; mod dev; mod embedded; @@ -22,8 +24,6 @@ mod progress_bar; mod run; mod watch; -use self::{app_state::AppState, dev::DevCommands, info_file::InfoFile, watch::WatchExit}; - const CURRENT_FORMAT_VERSION: u8 = 1; const DEVELOPING_OFFICIAL_RUSTLINGS: bool = { #[allow(unused_assignments, unused_mut)] diff --git a/src/watch.rs b/src/watch.rs index d20e552e..5ebe526f 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -11,10 +11,6 @@ use std::{ time::Duration, }; -mod notify_event; -mod state; -mod terminal_event; - use crate::app_state::{AppState, ExercisesProgress}; use self::{ @@ -23,6 +19,10 @@ use self::{ terminal_event::{terminal_event_handler, InputEvent}, }; +mod notify_event; +mod state; +mod terminal_event; + enum WatchEvent { Input(InputEvent), FileChange { exercise_ind: usize },