This repository was archived by the owner on Sep 14, 2023. It is now read-only.
This repository was archived by the owner on Sep 14, 2023. It is now read-only.
Open
Description
const MAIN_USAGE: &str = "
Usage:
cargo deadlinks [--dir <directory>]
";
fn main() {
let args: MainArgs = Docopt::new(MAIN_USAGE)
.and_then(|d| {
d.version(Some(env!("CARGO_PKG_VERSION").to_owned()))
.deserialize()
})
.unwrap_or_else(|e| e.exit());
dbg!(&args);
$ /home/joshua/.local/lib/cargo/target/debug/cargo-deadlinks deadlinks -- --document-private
[src/bin/cargo-deadlinks.rs:46] &args = MainArgs {
arg_directory: Some(
"--document-private",
),
}
This is wrong - docopt should either exit with an error or ignore the flag altogether (my preference is to exit with an error).
Metadata
Metadata
Assignees
Labels
No labels