Skip to content

Commit

Permalink
Feed Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoverbear committed Nov 8, 2023
1 parent a39dd2e commit b375a15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/cli/cmd/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,12 @@ impl CommandExecute for ListSubcommand {
eprintln!("No results");
} else if self.json {
print_json(&releases)?;
} else if std::io::stdout().is_terminal() {
let mut table = Table::new(releases);
table.with(DEFAULT_STYLE.clone());
println!("{table}");
} else {
if std::io::stdout().is_terminal() {
let mut table = Table::new(releases);
table.with(DEFAULT_STYLE.clone());
println!("{table}");
} else {
csv::Writer::from_writer(std::io::stdout()).serialize(releases)?;
}
csv::Writer::from_writer(std::io::stdout()).serialize(releases)?;
}
}
Err(e) => return Err(e.into()),
Expand Down
3 changes: 2 additions & 1 deletion src/cli/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ use self::{
search::SearchResult,
};

const DEFAULT_STYLE: Lazy<
#[allow(clippy::type_complexity)]
static DEFAULT_STYLE: Lazy<
Style<
On,
On,
Expand Down

0 comments on commit b375a15

Please sign in to comment.