Merge pull request #2832 from ehuss/remove-clap-macro_use
Remove clap macro_use
This commit is contained in:
commit
f2db034587
1 changed files with 3 additions and 6 deletions
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
#![allow(unreachable_pub, reason = "not needed in a bin crate")]
|
#![allow(unreachable_pub, reason = "not needed in a bin crate")]
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate clap;
|
|
||||||
|
|
||||||
use anyhow::anyhow;
|
use anyhow::anyhow;
|
||||||
use clap::{Arg, ArgMatches, Command};
|
use clap::{Arg, ArgMatches, Command};
|
||||||
use clap_complete::Shell;
|
use clap_complete::Shell;
|
||||||
|
|
@ -16,7 +13,7 @@ use tracing::{error, info};
|
||||||
|
|
||||||
mod cmd;
|
mod cmd;
|
||||||
|
|
||||||
const VERSION: &str = concat!("v", crate_version!());
|
const VERSION: &str = concat!("v", clap::crate_version!());
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
init_logger();
|
init_logger();
|
||||||
|
|
@ -59,8 +56,8 @@ fn main() {
|
||||||
|
|
||||||
/// Create a list of valid arguments and sub-commands
|
/// Create a list of valid arguments and sub-commands
|
||||||
fn create_clap_command() -> Command {
|
fn create_clap_command() -> Command {
|
||||||
let app = Command::new(crate_name!())
|
let app = Command::new(clap::crate_name!())
|
||||||
.about(crate_description!())
|
.about(clap::crate_description!())
|
||||||
.author("Mathieu David <mathieudavid@mathieudavid.org>")
|
.author("Mathieu David <mathieudavid@mathieudavid.org>")
|
||||||
.version(VERSION)
|
.version(VERSION)
|
||||||
.propagate_version(true)
|
.propagate_version(true)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue