Skip to content

Commit 67ea4c7

Browse files
committed
cargo clippy
1 parent 0130a25 commit 67ea4c7

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Diff for: src/onefetch/cli.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,9 @@ impl Cli {
346346

347347
let ascii_input = matches.value_of("ascii-input").map(String::from);
348348

349-
let ascii_language = if let Some(ascii_language) = matches.value_of("ascii-language") {
350-
Some(Language::from_str(&ascii_language.to_lowercase()).unwrap())
351-
} else {
352-
None
353-
};
349+
let ascii_language = matches
350+
.value_of("ascii-language")
351+
.map(|ascii_language| Language::from_str(&ascii_language.to_lowercase()).unwrap());
354352

355353
let ascii_colors = if let Some(values) = matches.values_of("ascii-colors") {
356354
values.map(String::from).collect()
@@ -377,7 +375,6 @@ impl Cli {
377375
.value_of("no-bots")
378376
.map_or(Regex::from_str(r"\[bot\]").unwrap(), |s| Regex::from_str(s).unwrap())
379377
});
380-
381378
Ok(Cli {
382379
repo_path,
383380
ascii_input,
@@ -397,8 +394,8 @@ impl Cli {
397394
print_package_managers,
398395
output,
399396
true_color,
400-
text_colors,
401397
art_off,
398+
text_colors,
402399
iso_time,
403400
show_email,
404401
})

Diff for: src/onefetch/info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ impl Info {
255255
repo_url,
256256
number_of_commits,
257257
lines_of_code,
258-
repo_size,
259258
file_count,
259+
repo_size,
260260
license,
261261
dominant_language,
262262
ascii_colors,

0 commit comments

Comments
 (0)