Skip to content

Commit cc96f37

Browse files
Do not allow Registrants to override this.
1 parent ab95f8f commit cc96f37

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

registry/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl<R: 'static> Registry<R> {
3737
pub fn add<I: Registrant<R> + 'static>(&mut self) {
3838
let data = Arc::new(RegistrantData {
3939
names: I::names(),
40-
argct: I::argct(),
40+
argct: I::Args::argct(),
4141
help_meta: I::help_meta(),
4242
help_msg: I::help_msg(),
4343
init: Box::new(I::init),
@@ -196,10 +196,6 @@ pub trait Registrant<R> {
196196

197197
fn init2(a: <Self::Args as RegistryArgs>::Val) -> R;
198198

199-
fn argct() -> usize {
200-
return Self::Args::argct();
201-
}
202-
203199
fn init(args: &[&str]) -> ValidationResult<R> {
204200
return Result::Ok(Self::init2(Self::Args::parse(args)?));
205201
}

0 commit comments

Comments
 (0)