Skip to content

Commit 9a10212

Browse files
authored
Update clap to v4 (#81)
1 parent cfe1788 commit 9a10212

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ optional = true
3838

3939
[dependencies]
4040
capnp = { version = "0.14", optional = true }
41-
clap = "3"
41+
clap = "4"
4242
flate2 = "1"
4343
glob = { version = "0.3", optional = true }
4444
kafka = { version = "0.8", features = ["snappy", "gzip", "security"], optional = true }

src/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ fn main() {
1818
)
1919
.get_matches();
2020
let config_file = matches
21-
.value_of("config_file")
21+
.get_one::<String>("config_file")
22+
.map(|s| s.as_ref())
2223
.unwrap_or(DEFAULT_CONFIG_FILE);
2324
let _ = writeln!(stderr(), "Flowgger {}", FLOWGGER_VERSION_STRING);
2425
flowgger::start(config_file)

0 commit comments

Comments
 (0)