summaryrefslogtreecommitdiff
path: root/src/run.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-03-31 20:08:23 +0200
committermo8it <mo8it@proton.me>2024-03-31 20:08:23 +0200
commit7560aec66b4a109c32ea59daa65580ab2ac26333 (patch)
tree5426916831771b19eab31fe9a14026ed1b27f26b /src/run.rs
parentfb32d0b86fd2f3f0c1e82fecbf2cf4931a7b1ff5 (diff)
Inline reset
Diffstat (limited to 'src/run.rs')
-rw-r--r--src/run.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/run.rs b/src/run.rs
index 2c9f99f..3f93f14 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -1,8 +1,7 @@
use anyhow::{bail, Result};
-use std::io::{self, stdout, Write};
+use std::io::{stdout, Write};
use std::time::Duration;
-use crate::embedded::{WriteStrategy, EMBEDDED_FILES};
use crate::exercise::{Exercise, Mode};
use crate::verify::test;
use indicatif::ProgressBar;
@@ -18,13 +17,7 @@ pub fn run(exercise: &Exercise, verbose: bool) -> Result<()> {
}
}
-// Resets the exercise by stashing the changes.
-pub fn reset(exercise: &Exercise) -> io::Result<()> {
- EMBEDDED_FILES.write_exercise_to_disk(&exercise.path, WriteStrategy::Overwrite)
-}
-
-// Invoke the rust compiler on the path of the given exercise
-// and run the ensuing binary.
+// Compile and run an exercise.
// This is strictly for non-test binaries, so output is displayed
fn compile_and_run(exercise: &Exercise) -> Result<()> {
let progress_bar = ProgressBar::new_spinner();