Skip to content

Commit

Permalink
chore: Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebarrie committed Aug 10, 2020
1 parent c4853ee commit 81f8c2f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/exercise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,10 @@ path = "{}.rs""#,
fn run(&self) -> Result<ExerciseOutput, ExerciseOutput> {
let arg = match self.mode {
Mode::Test => "--show-output",
_ => ""
_ => "",
};
let cmd = Command::new(&temp_file()).arg(arg)
let cmd = Command::new(&temp_file())
.arg(arg)
.output()
.expect("Failed to run 'run' command");

Expand Down
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ fn main() {
);
println!();
println!("We hope you enjoyed learning about the various aspects of Rust!");
println!(
"If you noticed any issues, please don't hesitate to report them to our repo."
);
println!("If you noticed any issues, please don't hesitate to report them to our repo.");
println!("You can also contribute your own exercises to help the greater community!");
println!();
println!("Before reporting an issue or contributing, please read our guidelines:");
Expand Down
6 changes: 2 additions & 4 deletions src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use indicatif::ProgressBar;
// determines whether or not the test harness outputs are displayed.
pub fn verify<'a>(
start_at: impl IntoIterator<Item = &'a Exercise>,
verbose: bool
verbose: bool,
) -> Result<(), &'a Exercise> {
for exercise in start_at {
let compile_result = match exercise.mode {
Expand Down Expand Up @@ -77,9 +77,7 @@ fn compile_and_run_interactively(exercise: &Exercise) -> Result<bool, ()> {

// Compile the given Exercise as a test harness and display
// the output if verbose is set to true
fn compile_and_test(
exercise: &Exercise, run_mode: RunMode, verbose: bool
) -> Result<bool, ()> {
fn compile_and_test(exercise: &Exercise, run_mode: RunMode, verbose: bool) -> Result<bool, ()> {
let progress_bar = ProgressBar::new_spinner();
progress_bar.set_message(format!("Testing {}...", exercise).as_str());
progress_bar.enable_steady_tick(100);
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@ fn run_single_test_success_without_output() {
.assert()
.code(0)
.stdout(predicates::str::contains("THIS TEST TOO SHALL PAS").not());
}
}

0 comments on commit 81f8c2f

Please sign in to comment.