From b48ef85ecea7f264b9aef879553f180f1125b8c8 Mon Sep 17 00:00:00 2001 From: Alena Yuryeva Date: Sat, 11 Aug 2018 21:32:06 +0300 Subject: [PATCH] fixed unique_args tests --- src/build/app/mod.rs | 5 ----- src/mkeymap.rs | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/build/app/mod.rs b/src/build/app/mod.rs index 6be1bad0..096b4032 100644 --- a/src/build/app/mod.rs +++ b/src/build/app/mod.rs @@ -1590,11 +1590,6 @@ impl<'a, 'b> App<'a, 'b> { // Perform expensive assertions on the Arg instance fn _arg_debug_asserts(&self, a: &Arg) -> bool { debugln!("App::_arg_debug_asserts:{}", a.name); - // No naming conflicts - assert!( - arg_names!(self).fold(0, |acc, n| if n == a.name { acc + 1 } else { acc }) < 2, - format!("Non-unique argument name: {} is already in use", a.name) - ); // Long conflicts if let Some(l) = a.long { diff --git a/src/mkeymap.rs b/src/mkeymap.rs index 1688a25e..a3916746 100644 --- a/src/mkeymap.rs +++ b/src/mkeymap.rs @@ -48,6 +48,7 @@ where .map(|&x| (x, &self.value_index[x])) .find(|(_i, x)| x == &&value) }) { + debug_assert!(false, "Non-unique value found"); index = idx; } else { self.value_index.push(value);