mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
Use $crate
prepend to make importing the _clap_count_exprs
macro unnecessary
This commit is contained in:
parent
e798fec73b
commit
ab65a0200d
1 changed files with 2 additions and 2 deletions
|
@ -264,7 +264,7 @@ macro_rules! values_t_or_exit {
|
|||
macro_rules! _clap_count_exprs {
|
||||
() => { 0 };
|
||||
($e:expr) => { 1 };
|
||||
($e:expr, $($es:expr),+) => { 1 + _clap_count_exprs!($($es),*) };
|
||||
($e:expr, $($es:expr),+) => { 1 + $crate::_clap_count_exprs!($($es),*) };
|
||||
}
|
||||
|
||||
/// Convenience macro to generate more complete enums with variants to be used as a type when
|
||||
|
@ -348,7 +348,7 @@ macro_rules! arg_enum {
|
|||
}
|
||||
impl $e {
|
||||
#[allow(dead_code)]
|
||||
pub fn variants() -> [&'static str; _clap_count_exprs!($(stringify!($v)),+)] {
|
||||
pub fn variants() -> [&'static str; $crate::_clap_count_exprs!($(stringify!($v)),+)] {
|
||||
[
|
||||
$(stringify!($v),)+
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue