Skip to content

Commit 81f8c2f

Browse files
committed
chore: Run cargo fmt
1 parent c4853ee commit 81f8c2f

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

src/exercise.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,10 @@ path = "{}.rs""#,
167167
fn run(&self) -> Result<ExerciseOutput, ExerciseOutput> {
168168
let arg = match self.mode {
169169
Mode::Test => "--show-output",
170-
_ => ""
170+
_ => "",
171171
};
172-
let cmd = Command::new(&temp_file()).arg(arg)
172+
let cmd = Command::new(&temp_file())
173+
.arg(arg)
173174
.output()
174175
.expect("Failed to run 'run' command");
175176

src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ fn main() {
126126
);
127127
println!();
128128
println!("We hope you enjoyed learning about the various aspects of Rust!");
129-
println!(
130-
"If you noticed any issues, please don't hesitate to report them to our repo."
131-
);
129+
println!("If you noticed any issues, please don't hesitate to report them to our repo.");
132130
println!("You can also contribute your own exercises to help the greater community!");
133131
println!();
134132
println!("Before reporting an issue or contributing, please read our guidelines:");

src/verify.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use indicatif::ProgressBar;
99
// determines whether or not the test harness outputs are displayed.
1010
pub fn verify<'a>(
1111
start_at: impl IntoIterator<Item = &'a Exercise>,
12-
verbose: bool
12+
verbose: bool,
1313
) -> Result<(), &'a Exercise> {
1414
for exercise in start_at {
1515
let compile_result = match exercise.mode {
@@ -77,9 +77,7 @@ fn compile_and_run_interactively(exercise: &Exercise) -> Result<bool, ()> {
7777

7878
// Compile the given Exercise as a test harness and display
7979
// the output if verbose is set to true
80-
fn compile_and_test(
81-
exercise: &Exercise, run_mode: RunMode, verbose: bool
82-
) -> Result<bool, ()> {
80+
fn compile_and_test(exercise: &Exercise, run_mode: RunMode, verbose: bool) -> Result<bool, ()> {
8381
let progress_bar = ProgressBar::new_spinner();
8482
progress_bar.set_message(format!("Testing {}...", exercise).as_str());
8583
progress_bar.enable_steady_tick(100);

tests/integration_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,4 @@ fn run_single_test_success_without_output() {
180180
.assert()
181181
.code(0)
182182
.stdout(predicates::str::contains("THIS TEST TOO SHALL PAS").not());
183-
}
183+
}

0 commit comments

Comments
 (0)