Skip to content

Commit

Permalink
Merge pull request #248 from lafrenierejm/print-mimes
Browse files Browse the repository at this point in the history
Normalize display of adapter information in `--rga-list-adapters`
  • Loading branch information
phiresky authored Sep 4, 2024
2 parents 4a4c092 + ce4114a commit 6b79490
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/bin/rga.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,12 @@ fn list_adapters(args: RgaConfig) -> Result<()> {
})
.collect::<Vec<_>>()
.join(", ");
let mime_text = if slow_matchers.is_empty() {
"".to_owned()
} else {
format!("Mime Types: {slow_matchers}")
};
print!(
" - **{name}**\n {desc} \n Extensions: {matchers} \n {mime} \n",
" - **{name}**\n {desc} \n Extensions: {matchers} \n Mime Types: {mime} \n",
name = meta.name,
desc = meta.description.replace('\n', "\n "),
matchers = matchers,
mime = mime_text
mime = slow_matchers,
);
println!();
};
Expand Down

0 comments on commit 6b79490

Please sign in to comment.