Skip to content

Commit

Permalink
Update toolchain.
Browse files Browse the repository at this point in the history
  • Loading branch information
orenbenkiki committed Apr 1, 2024
1 parent f919cf7 commit e7a7089
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ license = "GPL-3.0"
unindent = "^0.2.3"

[dependencies]
clap = { version = "^4.4.18", features = [ "cargo" ] }
clap = { version = "^4.5.4", features = [ "cargo" ] }
9 changes: 3 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ use std::process::{Command as ProcessCommand, Stdio};
#[cfg(test)]
use std::io;

#[cfg(test)]
use std::vec::Vec;

#[cfg(test)]
use unindent::unindent;

Expand Down Expand Up @@ -77,18 +74,18 @@ fn main() {
.get_one::<String>("directory") // FLAKY TESTED
.map_or(".", |argument| argument);

let status = matches
let status = matches // FLAKY TESTED
.subcommand_matches("todox")
.unwrap()
.get_one::<String>("output") // FLAKY TESTED
.map_or_else(|| run(&mut io::stderr(), directory), |output| { // FLAKY TESTED
let mut file = // FLAKY TESTED
File::create(output).unwrap_or_else(|_| panic!("{output}: failed to open")); // FLAKY TESTED
run(&mut file, directory)
run(&mut file, directory) // FLAKY TESTED
});

std::process::exit(status);
}
} // FLAKY TESTED

#[doc(hidden)]
fn run(output: &mut dyn Write, directory: &str) -> i32 {
Expand Down

0 comments on commit e7a7089

Please sign in to comment.