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/main.rs | |
| parent | 8c31d38fa17970d0d2dc696922eb8cb329a6fdb9 (diff) | |
State -> StateFile
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index e82fc80..3d691b0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,11 +1,6 @@ -use crate::consts::WELCOME; -use crate::embedded::{WriteStrategy, EMBEDDED_FILES}; -use crate::exercise::{Exercise, ExerciseList}; -use crate::run::run; -use crate::verify::verify; use anyhow::{bail, Context, Result}; use clap::{Parser, Subcommand}; -use state::State; +use state_file::StateFile; use std::path::Path; use std::process::exit; use verify::VerifyState; @@ -16,10 +11,16 @@ mod exercise; mod init; mod list; mod run; -mod state; +mod state_file; mod verify; mod watch; +use crate::consts::WELCOME; +use crate::embedded::{WriteStrategy, EMBEDDED_FILES}; +use crate::exercise::{Exercise, ExerciseList}; +use crate::run::run; +use crate::verify::verify; + /// Rustlings is a collection of small exercises to get you used to writing and reading Rust code #[derive(Parser)] #[command(version)] @@ -85,7 +86,7 @@ If you are just starting with Rustlings, run the command `rustlings init` to ini exit(1); } - let mut state = State::read_or_default(&exercises); + let mut state = StateFile::read_or_default(&exercises); match args.command { None | Some(Subcommands::Watch) => { |
