Skip to content

Commit 9cb465c

Browse files
Update src/onefetch/cli.rs
Unwrap a "always Some" format args Co-authored-by: Spenser Black <[email protected]>
1 parent 219190b commit 9cb465c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Diff for: src/onefetch/cli.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,7 @@ impl Cli {
252252
let no_color_palette = matches.is_present("no-color-palette");
253253
let print_languages = matches.is_present("languages");
254254
let print_package_managers = matches.is_present("package-managers");
255-
let format = if let Some(format) = matches.value_of("format") {
256-
String::from(format)
257-
} else {
258-
String::from("human")
259-
};
255+
let format = matches.value_of("format").map(String::from).unwrap();
260256

261257
let fields_to_hide: Vec<String> = if let Some(values) = matches.values_of("disable-fields")
262258
{

0 commit comments

Comments
 (0)