Skip to content

Commit d6ad201

Browse files
committed
Bump colored and clap versions
1 parent f24e11e commit d6ad201

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- windows-latest
2222
toolchain:
2323
- stable
24-
- 1.70.0
24+
- 1.80.0
2525
steps:
2626
- uses: actions/checkout@v4
2727
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
@@ -59,7 +59,7 @@ jobs:
5959
- beta
6060
toolchain:
6161
- stable
62-
- 1.70.0
62+
- 1.80.0
6363
steps:
6464
- uses: actions/checkout@v4
6565
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ include = ["Cargo.toml", "src/**/*", "tests/**/*", "examples/**/*", "LICENSE", "
2020

2121
[dependencies]
2222
log = { version = "0.4", features = ["std"] }
23-
colored = { version = "2.1.0", optional = true }
23+
colored = { version = "3.0", optional = true }
2424
chrono = { version = "0.4", default-features = false, features = ["std", "clock"], optional = true }
2525

2626
[target."cfg(not(windows))".dependencies]
@@ -44,7 +44,7 @@ date-based = ["chrono"]
4444

4545
[dev-dependencies]
4646
tempfile = "3"
47-
clap = "2.22"
47+
clap = "4"
4848
humantime = "2.1.0"
4949

5050
[[example]]

examples/cmd-program.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::{io, time::SystemTime};
22

33
use log::{debug, info, trace, warn};
44

5-
fn setup_logging(verbosity: u64) -> Result<(), fern::InitError> {
5+
fn setup_logging(verbosity: u8) -> Result<(), fern::InitError> {
66
let mut base_config = fern::Dispatch::new();
77

88
base_config = match verbosity {
@@ -64,17 +64,16 @@ fn setup_logging(verbosity: u64) -> Result<(), fern::InitError> {
6464
}
6565

6666
fn main() {
67-
let cmd_arguments = clap::App::new("cmd-program")
67+
let cmd_arguments = clap::Command::new("cmd-program")
6868
.arg(
69-
clap::Arg::with_name("verbose")
70-
.short("v")
69+
clap::Arg::new("verbose")
70+
.short('v')
7171
.long("verbose")
72-
.multiple(true)
7372
.help("Increases logging verbosity each use for up to 3 times"),
7473
)
7574
.get_matches();
7675

77-
let verbosity: u64 = cmd_arguments.occurrences_of("verbose");
76+
let verbosity = cmd_arguments.get_count("verbose");
7877

7978
setup_logging(verbosity).expect("failed to initialize logging.");
8079

0 commit comments

Comments
 (0)