Skip to content

Commit

Permalink
chore: Upgrade clap in fcomm
Browse files Browse the repository at this point in the history
- Removed `AppSettings` and `AppSettings::DeriveDisplayOrder` from `fcomm.rs`, cleaning up unused imports.
  See https://github.com/clap-rs/clap/blob/a3d93f485f0178f13fabedc55664071778d3f1d9/CHANGELOG.md?plain=1#L731
- Upgraded 'clap' package in `Cargo.toml` to align with the workspace version.
- Updated 'clap-verbosity-flag' package from '1.0' to '2.0',
  • Loading branch information
huitseeker committed Jul 31, 2023
1 parent f36971e commit a1338f4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 28 deletions.
28 changes: 5 additions & 23 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions fcomm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ base64 = { workspace = true }
bellperson = { workspace = true }
bincode = { workspace = true }
blstrs = { workspace = true }
clap = { version = "3.2", features = ["derive"] }
clap-verbosity-flag = "1.0"
clap = { workspace = true, features = ["derive"] }
clap-verbosity-flag = "2.0"
ff = { workspace = true }
hex = { version = "0.4.3", features = ["serde"] }
log = { workspace = true }
Expand Down
3 changes: 1 addition & 2 deletions fcomm/src/bin/fcomm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use lurk::ptr::{Ptr, TypePredicates};
use lurk::public_parameters::error;
use lurk::store::Store;

use clap::{AppSettings, Args, Parser, Subcommand};
use clap::{Args, Parser, Subcommand};
use clap_verbosity_flag::{Verbosity, WarnLevel};

use fcomm::{
Expand All @@ -34,7 +34,6 @@ use lurk::public_parameters::{public_params, FileStore};
/// Functional commitments
#[derive(Parser, Debug)]
#[clap(version, about, long_about = None)]
#[clap(global_setting(AppSettings::DeriveDisplayOrder))]
struct Cli {
/// Evaluate inputs before passing to function (outside the proof) when opening. Otherwise inputs are unevaluated.
#[clap(long, value_parser)]
Expand Down
2 changes: 1 addition & 1 deletion fcomm/tests/proof_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn test_bad_command() {

cmd.arg("uiop");
cmd.assert().failure().stderr(predicate::str::contains(
"error: Found argument 'uiop' which wasn't expected, or isn't valid in this context",
"unrecognized subcommand \'uiop\'",
));
}

Expand Down

0 comments on commit a1338f4

Please sign in to comment.