From dccd4c33061c4e010309be4b0f4f2538799ec156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 14 Jun 2022 10:39:31 +0300 Subject: [PATCH] sodium: Update to no-deprecated clap 3.2 API See https://github.com/clap-rs/clap/issues/3822 --- generic/sodium/Cargo.toml | 2 +- generic/sodium/examples/decrypt_example.rs | 4 ++-- generic/sodium/examples/encrypt_example.rs | 4 ++-- generic/sodium/examples/generate_keys.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/generic/sodium/Cargo.toml b/generic/sodium/Cargo.toml index 00bd8168..d707fe89 100644 --- a/generic/sodium/Cargo.toml +++ b/generic/sodium/Cargo.toml @@ -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 } diff --git a/generic/sodium/examples/decrypt_example.rs b/generic/sodium/examples/decrypt_example.rs index d808b92e..bd87bd6d 100644 --- a/generic/sodium/examples/decrypt_example.rs +++ b/generic/sodium/examples/decrypt_example.rs @@ -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, } diff --git a/generic/sodium/examples/encrypt_example.rs b/generic/sodium/examples/encrypt_example.rs index 2f894d66..d4b215b9 100644 --- a/generic/sodium/examples/encrypt_example.rs +++ b/generic/sodium/examples/encrypt_example.rs @@ -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, } diff --git a/generic/sodium/examples/generate_keys.rs b/generic/sodium/examples/generate_keys.rs index 17c3905e..106830b2 100644 --- a/generic/sodium/examples/generate_keys.rs +++ b/generic/sodium/examples/generate_keys.rs @@ -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, }