Place mods under all imports

This commit is contained in:
mo8it 2024-04-18 11:31:08 +02:00
parent 1eac00e89a
commit 2566f9aaf6
3 changed files with 8 additions and 8 deletions

View File

@ -7,12 +7,12 @@ use crossterm::{
use ratatui::{backend::CrosstermBackend, Terminal}; use ratatui::{backend::CrosstermBackend, Terminal};
use std::io; use std::io;
mod state;
use crate::app_state::AppState; use crate::app_state::AppState;
use self::state::{Filter, UiState}; use self::state::{Filter, UiState};
mod state;
pub fn list(app_state: &mut AppState) -> Result<()> { pub fn list(app_state: &mut AppState) -> Result<()> {
let mut stdout = io::stdout().lock(); let mut stdout = io::stdout().lock();
stdout.execute(EnterAlternateScreen)?; stdout.execute(EnterAlternateScreen)?;

View File

@ -11,6 +11,8 @@ use std::{
process::exit, process::exit,
}; };
use self::{app_state::AppState, dev::DevCommands, info_file::InfoFile, watch::WatchExit};
mod app_state; mod app_state;
mod dev; mod dev;
mod embedded; mod embedded;
@ -22,8 +24,6 @@ mod progress_bar;
mod run; mod run;
mod watch; mod watch;
use self::{app_state::AppState, dev::DevCommands, info_file::InfoFile, watch::WatchExit};
const CURRENT_FORMAT_VERSION: u8 = 1; const CURRENT_FORMAT_VERSION: u8 = 1;
const DEVELOPING_OFFICIAL_RUSTLINGS: bool = { const DEVELOPING_OFFICIAL_RUSTLINGS: bool = {
#[allow(unused_assignments, unused_mut)] #[allow(unused_assignments, unused_mut)]

View File

@ -11,10 +11,6 @@ use std::{
time::Duration, time::Duration,
}; };
mod notify_event;
mod state;
mod terminal_event;
use crate::app_state::{AppState, ExercisesProgress}; use crate::app_state::{AppState, ExercisesProgress};
use self::{ use self::{
@ -23,6 +19,10 @@ use self::{
terminal_event::{terminal_event_handler, InputEvent}, terminal_event::{terminal_event_handler, InputEvent},
}; };
mod notify_event;
mod state;
mod terminal_event;
enum WatchEvent { enum WatchEvent {
Input(InputEvent), Input(InputEvent),
FileChange { exercise_ind: usize }, FileChange { exercise_ind: usize },