From ce1a1d1e5a5f86e5e0cbffe73992ea7356fef08e Mon Sep 17 00:00:00 2001 From: Dompeh Kofi Bright Date: Wed, 13 Mar 2024 03:07:43 +0000 Subject: [PATCH] feat: stash all changes at once --- src/main.rs | 6 ++---- src/run.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index bc4ffa5d..fdf4c234 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use crate::exercise::{Exercise, ExerciseList}; use crate::project::RustAnalyzerProject; -use crate::run::{reset, run, reset_all}; +use crate::run::{reset, reset_all, run}; use crate::verify::verify; use clap::{Parser, Subcommand}; use console::Emoji; @@ -56,9 +56,7 @@ enum Subcommands { /// The name of the exercise name: String, }, - ResetAll { - - }, + ResetAll {}, /// Return a hint for the given exercise Hint { /// The name of the exercise diff --git a/src/run.rs b/src/run.rs index aeb80dee..ec13fc38 100644 --- a/src/run.rs +++ b/src/run.rs @@ -36,7 +36,7 @@ pub fn reset_all(exercises: &[Exercise]) -> Result<(), ()> { for exercise in exercises { let command = Command::new("git") .args(["stash", "push", "--"]) - .arg (&exercise.path) + .arg(&exercise.path) .spawn(); if command.is_err() {