Skip to content

Commit 4848750

Browse files
committed
Fix parsing cli arguments.
1 parent 4879a02 commit 4848750

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ fn main() {
3838
)
3939
.get_matches();
4040

41-
let config_files = matches.values_of_lossy("config").unwrap_or(vec![]);
41+
let config_files: Vec<String> = match matches.get_many::<String>("config") {
42+
None => vec![],
43+
Some(v) => v.cloned().collect(),
44+
};
4245
let config = config::Configuration::get(config_files).expect("read configuration error");
4346
let log_level =
4447
log::Level::from_str(&config.udp_forwarder.log_level).expect("parse log_level error");

0 commit comments

Comments
 (0)