Skip to content

Commit

Permalink
fix: Clap error in examples/timestamp
Browse files Browse the repository at this point in the history
Currently, examples/timestamp raises runtime error by violation of
constraints of clap.

`Arg::multiple()` is deprecated in clap 3.* [1].
This PR uses `Arg::multiple_occurrences()` instead and fixes the error.

[1] https://docs.rs/clap/3.0.0/clap/struct.Arg.html#method.multiple
  • Loading branch information
kenoss authored and cardoe committed Jan 31, 2024
1 parent af1941b commit 2ec0593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
.arg(
Arg::with_name("verbosity")
.short('v')
.multiple(true)
.multiple_occurrences(true)
.help("Increase message verbosity"),
)
.arg(
Expand Down

0 comments on commit 2ec0593

Please sign in to comment.