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
  • Loading branch information
frobiac committed Dec 10, 2021
1 parent d67a09a commit 9c8492d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 30 deletions.
38 changes: 16 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
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ use clap::{App, Arg, ValueHint};
pub fn args(year: u16) -> App<'static> {
App::new(format!("Advent of Code {}", year))
.author("Rémi D. <remi@dupre.io>")
.about("Main page of the event: https://adventofcode.com/")
.override_help("Main page of the event: https://adventofcode.com/")
.arg(
Arg::new("stdin")
.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

0 comments on commit 9c8492d

Please sign in to comment.