Skip to content

Commit

Permalink
Blessed be the name of Clap, amen.
Browse files Browse the repository at this point in the history
  • Loading branch information
CreepySkeleton committed Feb 12, 2020
1 parent 482e16d commit 9106cee
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions clap_derive/examples/rename_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! with underscores.
//! - **Verbatim**: Use the original attribute name defined in the code.
use clap::{Clap, Subcommand};
use clap::Clap;

#[derive(Clap, Debug)]
#[clap(name = "rename_all", rename_all = "screaming_snake_case")]
Expand Down Expand Up @@ -55,7 +55,7 @@ enum Opt {
},
}

#[derive(Subcommand, Debug)]
#[derive(Clap, Debug)]
enum Subcommands {
// This one will be available as `first-subcommand`.
FirstSubcommand,
Expand Down
4 changes: 2 additions & 2 deletions clap_derive/tests/argument_naming.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use clap::{Clap, Subcommand};
use clap::Clap;

#[test]
fn test_single_word_enum_variant_is_default_renamed_into_kebab_case() {
Expand Down Expand Up @@ -223,7 +223,7 @@ fn test_rename_all_is_not_propagated_from_struct_into_subcommand() {
foo: Foo,
}

#[derive(Subcommand, Debug, PartialEq)]
#[derive(Clap, Debug, PartialEq)]
enum Foo {
Command {
#[clap(long)]
Expand Down
4 changes: 2 additions & 2 deletions clap_derive/tests/doc-comments-help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

mod utils;

use clap::{Clap, Subcommand};
use clap::Clap;
use utils::*;

#[test]
Expand Down Expand Up @@ -101,7 +101,7 @@ fn top_long_doc_comment_both_help_long_help() {
foo: SubCommand,
}

#[derive(Subcommand, Debug)]
#[derive(Clap, Debug)]
pub enum SubCommand {
/// DO NOT PASS A BAR UNDER ANY CIRCUMSTANCES
///
Expand Down
2 changes: 1 addition & 1 deletion clap_derive/tests/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn issue_324() {
_cmd: Option<SubCommand>,
}

#[derive(Subcommand)]
#[derive(Clap)]
enum SubCommand {
Start,
}
Expand Down
10 changes: 5 additions & 5 deletions clap_derive/tests/nested-subcommands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// commit#ea76fa1b1b273e65e3b0b1046643715b49bec51f which is licensed under the
// MIT/Apache 2.0 license.

use clap::{Clap, Subcommand};
use clap::Clap;

#[derive(Clap, PartialEq, Debug)]
struct Opt {
Expand Down Expand Up @@ -115,7 +115,7 @@ struct Opt3 {
cmd: Sub2,
}

#[derive(Subcommand, PartialEq, Debug)]
#[derive(Clap, PartialEq, Debug)]
enum Sub2 {
Foo {
file: String,
Expand All @@ -125,7 +125,7 @@ enum Sub2 {
Bar {},
}

#[derive(Subcommand, PartialEq, Debug)]
#[derive(Clap, PartialEq, Debug)]
enum Sub3 {
Baz {},
Quux {},
Expand Down Expand Up @@ -156,13 +156,13 @@ enum SubSubCmdWithOption {
cmd: Stash,
},
}
#[derive(Subcommand, PartialEq, Debug)]
#[derive(Clap, PartialEq, Debug)]
enum Remote {
Add { name: String, url: String },
Remove { name: String },
}

#[derive(Subcommand, PartialEq, Debug)]
#[derive(Clap, PartialEq, Debug)]
enum Stash {
Save,
Pop,
Expand Down
4 changes: 2 additions & 2 deletions clap_derive/tests/subcommands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ fn test_tuple_commands() {
// Daemon(DaemonCommand),
// }

// #[derive(Subcommand, Debug, PartialEq)]
// #[derive(Clap, Debug, PartialEq)]
// pub enum DaemonCommand {
// Start,
// Stop,
Expand All @@ -196,7 +196,7 @@ fn test_tuple_commands() {
// #[clap(flatten)]
// sub_cmd: SubCmd,
// }
// #[derive(Subcommand, Debug, PartialEq)]
// #[derive(Clap, Debug, PartialEq)]
// enum SubCmd {
// Foo,
// Bar,
Expand Down
4 changes: 2 additions & 2 deletions clap_derive/tests/ui/subcommand_and_parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use clap::{Clap, Subcommand};
use clap::Clap;

#[derive(Clap, Debug)]
struct MakeCookie {
Expand All @@ -17,7 +17,7 @@ struct MakeCookie {
cmd: Command,
}

#[derive(Subcommand, Debug)]
#[derive(Clap, Debug)]
enum Command {
/// Pound acorns into flour for cookie dough.
Pound { acorns: u32 },
Expand Down
4 changes: 2 additions & 2 deletions clap_derive/tests/ui/subcommand_opt_opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use clap::{Clap, Subcommand};
use clap::Clap;

#[derive(Clap, Debug)]
struct MakeCookie {
Expand All @@ -17,7 +17,7 @@ struct MakeCookie {
cmd: Option<Option<Command>>,
}

#[derive(Subcommand, Debug)]
#[derive(Clap, Debug)]
enum Command {
/// Pound acorns into flour for cookie dough.
Pound { acorns: u32 },
Expand Down
4 changes: 2 additions & 2 deletions clap_derive/tests/ui/subcommand_opt_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use clap::{Clap, Subcommand};
use clap::Clap;

#[derive(Clap, Debug)]
struct MakeCookie {
Expand All @@ -17,7 +17,7 @@ struct MakeCookie {
cmd: Option<Vec<Command>>,
}

#[derive(Subcommand, Debug)]
#[derive(Clap, Debug)]
enum Command {
/// Pound acorns into flour for cookie dough.
Pound { acorns: u32 },
Expand Down

0 comments on commit 9106cee

Please sign in to comment.