Skip to content

Commit 5afe4a6

Browse files
Mohammad Fawazmohammadfawaz
Mohammad Fawaz
authored andcommitted
Bring back conflicts_all_all but inside the group "mode" and fix some help strings
1 parent 9d8ba89 commit 5afe4a6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

leo/cli/commands/query/transaction.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ use clap::Parser;
2626
))]
2727
#[command(group(
2828
// Ensure at most one mode is specified and ony if using "id" as a source.
29-
clap::ArgGroup::new("mode").required(false).multiple(false).requires("id")
29+
// The `conflicts_with_all` here should not be required but it looks like Clap is getting a little confused
30+
clap::ArgGroup::new("mode")
31+
.required(false)
32+
.multiple(false)
33+
.requires("ID").conflicts_with_all(["from_io", "from_transition", "from_program"]
34+
)
3035
))]
3136
pub struct LeoTransaction {
3237
#[clap(name = "ID", help = "The ID of the transaction to fetch", group = "source")]
@@ -38,21 +43,21 @@ pub struct LeoTransaction {
3843
#[arg(
3944
value_name = "INPUT_OR_OUTPUT_ID",
4045
long,
41-
help = "Get the transition id that an input or output id occurred in",
46+
help = "Get the ID of the transaction that an input or output ID occurred in",
4247
group = "source"
4348
)]
4449
pub(crate) from_io: Option<String>,
4550
#[arg(
4651
value_name = "TRANSITION_ID",
4752
long,
48-
help = "Get the id of the transaction containing the specified transition",
53+
help = "Get the ID of the transaction containing the specified transition",
4954
group = "source"
5055
)]
5156
pub(crate) from_transition: Option<String>,
5257
#[arg(
5358
value_name = "PROGRAM",
5459
long,
55-
help = "Get the id of the transaction id that the specified program was deployed in",
60+
help = "Get the ID of the transaction that the specified program was deployed in",
5661
group = "source"
5762
)]
5863
pub(crate) from_program: Option<String>,

0 commit comments

Comments
 (0)