sodium: Update to no-deprecated clap 3.2 API

See https://github.com/clap-rs/clap/issues/3822
This commit is contained in:
Sebastian Dröge 2022-06-14 10:39:31 +03:00
parent 79bce5ddea
commit dccd4c3306
4 changed files with 7 additions and 7 deletions

View file

@ -17,7 +17,7 @@ hex = "0.4"
smallvec = "1.0"
# example
clap = { version = "3", optional = true, features = ["derive"] }
clap = { version = "3.2", optional = true, features = ["derive"] }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }

View file

@ -38,11 +38,11 @@ use serde::{Deserialize, Serialize};
#[clap(about = "Decrypt a gstsodium10 file")]
struct Args {
/// File to encrypt
#[clap(short, long)]
#[clap(short, long, action)]
input: String,
/// File to decrypt
#[clap(short, long)]
#[clap(short, long, action)]
output: String,
}

View file

@ -38,11 +38,11 @@ use serde::{Deserialize, Serialize};
#[clap(about = "Encrypt a file with in the gstsodium10 format")]
struct Args {
/// File to encrypt
#[clap(short, long)]
#[clap(short, long, action)]
input: String,
/// File to decrypt
#[clap(short, long)]
#[clap(short, long, action)]
output: String,
}

View file

@ -33,11 +33,11 @@ use std::path::PathBuf;
#[clap(about = "Generate a pair of Sodium's crypto_box_curve25519xsalsa20poly1305 keys.")]
struct Args {
/// Path to write the Keys
#[clap(short, long, parse(from_os_str))]
#[clap(short, long, action)]
path: PathBuf,
/// Write a JSON file instead of a key.prv/key.pub pair
#[clap(short, long)]
#[clap(short, long, action)]
json: bool,
}