From 68e8e93bd0ac71ffd59fe6d7bef166acb9082a06 Mon Sep 17 00:00:00 2001 From: Martin Frost Date: Sat, 11 Dec 2021 00:17:51 +0100 Subject: [PATCH] Use clap for git-delete-coauthor --- src/bin/git-delete-coauthor.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/git-delete-coauthor.rs b/src/bin/git-delete-coauthor.rs index 974a0bc..f657a27 100644 --- a/src/bin/git-delete-coauthor.rs +++ b/src/bin/git-delete-coauthor.rs @@ -1,8 +1,8 @@ +use clap::Parser; use git_mob::{get_available_coauthors, write_coauthors_file}; -use structopt::StructOpt; -#[derive(StructOpt, Debug)] -#[structopt(name="git-delete-coauthor")] +#[derive(Parser, Debug)] +#[clap(name = "git-delete-coauthor", version)] /// Delete a co-author from your .git-coauthors file struct Opt { /// Initials of the co-author to delete @@ -10,7 +10,7 @@ struct Opt { } fn main() { - let opt = Opt::from_args(); + let opt = Opt::parse(); let mut authors = get_available_coauthors(); authors.remove(&opt.initials); write_coauthors_file(authors);