From d8e7184b0910f66e9fbce7e02d14b5f7abe5f56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 17 Apr 2022 10:58:37 +0200 Subject: [PATCH] Use clap::Command instead of the deprecated clap::App --- acmed/src/main.rs | 4 ++-- tacd/src/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/acmed/src/main.rs b/acmed/src/main.rs index ae4abb8..19cd9cb 100644 --- a/acmed/src/main.rs +++ b/acmed/src/main.rs @@ -4,7 +4,7 @@ use acme_common::crypto::{ }; use acme_common::logs::{set_log_system, DEFAULT_LOG_LEVEL}; use acme_common::{clean_pid_file, init_server}; -use clap::{App, Arg}; +use clap::{Arg, Command}; use log::error; mod account; @@ -59,7 +59,7 @@ fn main() { env!("ACMED_HTTP_LIB_VERSION") ); let default_log_level = DEFAULT_LOG_LEVEL.to_string().to_lowercase(); - let matches = App::new(APP_NAME) + let matches = Command::new(APP_NAME) .version(APP_VERSION) .long_version(full_version.as_str()) .arg( diff --git a/tacd/src/main.rs b/tacd/src/main.rs index f8cc6e5..42c3b1d 100644 --- a/tacd/src/main.rs +++ b/tacd/src/main.rs @@ -7,7 +7,7 @@ use acme_common::crypto::{get_lib_name, get_lib_version, HashFunction, KeyType, use acme_common::error::Error; use acme_common::logs::{set_log_system, DEFAULT_LOG_LEVEL}; use acme_common::{clean_pid_file, to_idna}; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgMatches, Command}; use log::{debug, error, info}; use std::fs::File; use std::io::{self, Read}; @@ -79,7 +79,7 @@ fn main() { let default_crt_key_type = DEFAULT_CRT_KEY_TYPE.to_string(); let default_crt_digest = DEFAULT_CRT_DIGEST.to_string(); let default_log_level = DEFAULT_LOG_LEVEL.to_string().to_lowercase(); - let matches = App::new(APP_NAME) + let matches = Command::new(APP_NAME) .version(APP_VERSION) .long_version(full_version.as_str()) .arg(