|
|
@ -448,9 +448,16 @@ impl MappableCommand {
|
|
|
|
|
|
|
|
|
|
|
|
impl fmt::Debug for MappableCommand {
|
|
|
|
impl fmt::Debug for MappableCommand {
|
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
|
f.debug_tuple("MappableCommand")
|
|
|
|
match self {
|
|
|
|
.field(&self.name())
|
|
|
|
MappableCommand::Static { name, .. } => {
|
|
|
|
.finish()
|
|
|
|
f.debug_tuple("MappableCommand").field(name).finish()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
MappableCommand::Typable { name, args, .. } => f
|
|
|
|
|
|
|
|
.debug_tuple("MappableCommand")
|
|
|
|
|
|
|
|
.field(name)
|
|
|
|
|
|
|
|
.field(args)
|
|
|
|
|
|
|
|
.finish(),
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -505,12 +512,16 @@ impl PartialEq for MappableCommand {
|
|
|
|
match (self, other) {
|
|
|
|
match (self, other) {
|
|
|
|
(
|
|
|
|
(
|
|
|
|
MappableCommand::Typable {
|
|
|
|
MappableCommand::Typable {
|
|
|
|
name: first_name, ..
|
|
|
|
name: first_name,
|
|
|
|
|
|
|
|
args: first_args,
|
|
|
|
|
|
|
|
..
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MappableCommand::Typable {
|
|
|
|
MappableCommand::Typable {
|
|
|
|
name: second_name, ..
|
|
|
|
name: second_name,
|
|
|
|
|
|
|
|
args: second_args,
|
|
|
|
|
|
|
|
..
|
|
|
|
},
|
|
|
|
},
|
|
|
|
) => first_name == second_name,
|
|
|
|
) => first_name == second_name && first_args == second_args,
|
|
|
|
(
|
|
|
|
(
|
|
|
|
MappableCommand::Static {
|
|
|
|
MappableCommand::Static {
|
|
|
|
name: first_name, ..
|
|
|
|
name: first_name, ..
|
|
|
|