Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to clap v4 and remove atty dependency #64

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix clippy lints
  • Loading branch information
sosthene-nitrokey committed Nov 21, 2023
commit 6df7fe2c1df67a6af733e1756d3eb57b7275cf29
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn one_license_per_line(
}
}

fn colored<'a, 'b>(s: &'a str, style: &'b Style, enable_color: bool) -> Cow<'a, str> {
fn colored<'a>(s: &'a str, style: &Style, enable_color: bool) -> Cow<'a, str> {
if enable_color {
Cow::Owned(format!("{}", style.paint(s)))
} else {
Expand Down Expand Up @@ -251,10 +251,10 @@ fn run() -> Result<()> {

fn main() {
exit(match run() {
Ok(_) => 0,
Ok(()) => 0,
Err(e) => {
for cause in e.chain() {
eprintln!("{}", cause);
eprintln!("{cause}");
}
1
}
Expand Down