Skip to content

Commit

Permalink
clap update from 3.0.0-beta.2 to rc.3 renamed Args::about() to help() (
Browse files Browse the repository at this point in the history
…#17)

* clap update from 3.0.0-beta.2 to rc.3 renamed Args::about() to help()

See [#3075] (clap-rs/clap#3075)
and [CHANGELOG] (https://github.com/clap-rs/clap/blob/ee2d70f8ef40025beb2ef901e39119ed1f809533/CHANGELOG.md?plain=1#L109)

* Revert to App::about(), and typo in comment
  • Loading branch information
frobiac committed Dec 14, 2021
1 parent a9b912d commit afe872a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 30 deletions.
36 changes: 14 additions & 22 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "aoc-main"
description = "A macro which defines a handful main for the Advent of Code"
version = "0.3.0"
version = "0.3.1"
authors = ["Rémi Dupré <r.dupre@qwant.com>"]
repository = "https://github.com/remi-dupre/aoc"
license = "Apache-2.0"
Expand All @@ -15,7 +15,7 @@ bench = ["criterion"]

[dependencies]
attohttpc = { version = "0.16.0", default_features = false, features = ["tls"] }
clap = { version = "3.0.0-beta.2", default_features = false, features = ["std"] }
clap = { version = "3.0.0-rc.3", default_features = false, features = ["std"] }
colored = "2.0.0"
dirs = "3.0.1"

Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub fn args(year: u16) -> App<'static> {
.short('i')
.long("stdin")
.conflicts_with("file")
.about("Read input from stdin instead of downloading it"),
.help("Read input from stdin instead of downloading it"),
)
.arg(
Arg::new("file")
Expand All @@ -29,28 +29,28 @@ pub fn args(year: u16) -> App<'static> {
.long("file")
.conflicts_with("stdin")
.value_hint(ValueHint::FilePath)
.about("Read input from file instead of downloading it"),
.help("Read input from file instead of downloading it"),
)
.arg(
Arg::new("days")
.takes_value(true)
.short('d')
.long("day")
.value_name("day num")
.about("Days to execute. By default all implemented days will run"),
.help("Days to execute. By default all implemented days will run"),
)
.arg(
Arg::new("bench")
.short('b')
.long("bench")
.about("Run criterion benchmarks"),
.help("Run criterion benchmarks"),
)
.arg(
Arg::new("all")
.short('a')
.long("all")
.conflicts_with("days")
.about("Run all days"),
.help("Run all days"),
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/parse/gen_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ macro_rules! run_day {

#[macro_export]
macro_rules! run_gen {
// No generator is needed: default begavior is to just pass input &str
// No generator is needed: default behavior is to just pass input &str
( $day: ident, $data: expr, { gen_default } ) => {{
Some($data)
}};
Expand Down

0 comments on commit afe872a

Please sign in to comment.