Skip to content

Commit

Permalink
Update arg parsing to clap v3
Browse files Browse the repository at this point in the history
  • Loading branch information
tranzystorekk authored and nuxeh committed May 28, 2022
1 parent 9198a6f commit 78742b1
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 122 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde_derive = "1.0.117"
serde_json = "1.0.59"
tempfile = "3.1.0"
libsqlite3-sys = { version = ">=0.8.0, <0.21.0", features = ["min_sqlite_version_3_7_16", "bundled"], optional = true }
structopt = "0.3.21"
clap = { version = "3.1", features = ["derive"] }
atty = "0.2.14"
ureq = "2.2.0"

Expand Down
158 changes: 86 additions & 72 deletions aocf_cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion aocf_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ glob = "0.3.0"
termimad = "0.9.1"
crossterm = "0.17.7"
regex = "1.4.2"
structopt = "0.3.21"
clap = { version = "3.1", features = ["derive"] }
clap_complete = "3.1"
webbrowser = "0.5.5"

[package.metadata.deb]
Expand Down
13 changes: 0 additions & 13 deletions aocf_cli/build.rs

This file was deleted.

4 changes: 2 additions & 2 deletions aocf_cli/src/bin/aocf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ use tempfile::tempdir;
use glob::glob;
use failure::{Error, bail, format_err};
use regex::Regex;
use structopt::StructOpt;
use clap::Parser;
use chrono::{Utc, Datelike};
use webbrowser;

fn main() {
let opt = Aocf::from_args();
let opt = Aocf::parse();

run(&opt).unwrap_or_else(|err| {
eprintln!("error: {}", err);
Expand Down
Loading

0 comments on commit 78742b1

Please sign in to comment.