mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
fix(builder)!: Move remove to reflection from builder
It isn't derive compatible, so I have the feeling it should be treated differently.
This commit is contained in:
parent
fba563a717
commit
7d14ce34de
1 changed files with 6 additions and 7 deletions
|
@ -880,13 +880,6 @@ impl Arg {
|
|||
self.ext.set(tagged);
|
||||
self
|
||||
}
|
||||
|
||||
/// Remove an [`ArgExt`]
|
||||
#[cfg(feature = "unstable-ext")]
|
||||
pub fn remove<T: ArgExt + Extension>(mut self) -> Self {
|
||||
self.ext.remove::<T>();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// # Value Handling
|
||||
|
@ -4240,6 +4233,12 @@ impl Arg {
|
|||
pub fn get<T: ArgExt + Extension>(&self) -> Option<&T> {
|
||||
self.ext.get::<T>()
|
||||
}
|
||||
|
||||
/// Remove an [`ArgExt`]
|
||||
#[cfg(feature = "unstable-ext")]
|
||||
pub fn remove<T: ArgExt + Extension>(mut self) -> Option<T> {
|
||||
self.ext.remove::<T>()
|
||||
}
|
||||
}
|
||||
|
||||
/// # Internally used only
|
||||
|
|
Loading…
Reference in a new issue