fn gather_conflicts(&mut self, matcher: &mut ArgMatcher) {
        debug!("Validator::gather_conflicts");
        for name in matcher.arg_names() {
            debug!("Validator::gather_conflicts:iter:{:?}", name);
            if let Some(arg) = self.p.app.find(name) {
                // Since an arg was used, every arg it conflicts with is added to the conflicts
                if let Some(ref bl) = arg.blacklist {
                    for conf in bl {
                        if self.p.app.find(conf).is_some() {
                            if conf != name {
                                self.c.insert(conf.clone());
                            }
                        } else {
                            // for g_arg in self.p.app.unroll_args_in_group(conf) {
                            //     if &g_arg != name {
                            self.c.insert(conf.clone()); // TODO ERROR is here - groups allow one arg but this line disallows all group args
                                                         //     }
                                                         // }
                        }
                    }
                }

                // Now we need to know which groups this arg was a memeber of, to add all other
                // args in that group to the conflicts, as well as any args those args conflict
                // with

                // // FIXME: probably no need to clone the id here. Review the macro
                for grp in groups_for_arg!(self.p.app, name.clone()) {
                    if let Some(g) = self
                        .p
                        .app
                        .groups
                        .iter()
                        .filter(|g| !g.multiple)
                        .find(|g| g.id == grp)
                    {
                        // for g_arg in self.p.app.unroll_args_in_group(&g.name) {
                        //     if &g_arg != name {
                        self.c.insert(g.id.clone());
                        //     }
                        // }
                    }
                }
            } else if let Some(g) = self
                .p
                .app
                .groups
                .iter()
                .filter(|g| !g.multiple)
                .find(|grp| grp.id == *name)
            {
                debug!("Validator::gather_conflicts:iter:{:?}:group", name);
                self.c.insert(g.id.clone());
            }
        }
    }
// Gathers potential conflicts based on used argument, but without considering requirements
// and such
Gathers potential conflicts based on used argument, but without considering requirements
and such
Gathers potential conflicts based on used argument but without considering requirements and such
fn gather_conflicts(&mut self, matcher: &mut ArgMatcher) {
        debug!("Validator::gather_conflicts");
        for name in matcher.arg_names() {
            debug!("Validator::gather_conflicts:iter:{:?}", name);
            if let Some(arg) = self.p.app.find(name) {
                // Since an arg was used, every arg it conflicts with is added to the conflicts
                if let Some(ref bl) = arg.blacklist {
                    for conf in bl {
                        if self.p.app.find(conf).is_some() {
                            if conf != name {
                                self.c.insert(conf.clone());
                            }
                        } else {
                            // for g_arg in self.p.app.unroll_args_in_group(conf) {
                            //     if &g_arg != name {
                            self.c.insert(conf.clone()); // TODO ERROR is here - groups allow one arg but this line disallows all group args
                                                         //     }
                                                         // }
                        }
                    }
                }
                // Now we need to know which groups this arg was a memeber of, to add all other
                // args in that group to the conflicts, as well as any args those args conflict
                // with
                // // FIXME: probably no need to clone the id here. Review the macro
                for grp in groups_for_arg!(self.p.app, name.clone()) {
                    if let Some(g) = self
                        .p
                        .app
                        .groups
                        .iter()
                        .filter(|g| !g.multiple)
                        .find(|g| g.id == grp)
                    {
                        // for g_arg in self.p.app.unroll_args_in_group(&g.name) {
                        //     if &g_arg != name {
                        self.c.insert(g.id.clone());
                        //     }
                        // }
                    }
                }
            } else if let Some(g) = self
                .p
                .app
                .groups
                .iter()
                .filter(|g| !g.multiple)
                .find(|grp| grp.id == *name)
            {
                debug!("Validator::gather_conflicts:iter:{:?}:group", name);
                self.c.insert(g.id.clone());
            }
        }
    }
fn gather_conflicts ( & mut self , matcher : & mut ArgMatcher ) { debug ! ( " " ) ; for name in matcher . arg_names ( ) { debug ! ( " " name ) ; if let Some ( arg ) = self . p . app . find ( name ) { // Since an arg was used, every arg it conflicts with is added to the conflicts if let Some ( ref bl ) = arg . blacklist { for conf in bl { if self . p . app . find ( conf ) . is_some ( ) { if conf != name { self . c . insert ( conf . clone ( ) ) ; } } else { // for g_arg in self.p.app.unroll_args_in_group(conf) { //     if &g_arg != name { self . c . insert ( conf . clone ( ) ) ; // TODO ERROR is here - groups allow one arg but this line disallows all group args //     } // } } } } // Now we need to know which groups this arg was a memeber of, to add all other // args in that group to the conflicts, as well as any args those args conflict // with // // FIXME: probably no need to clone the id here. Review the macro for grp in groups_for_arg ! ( self p app name clone ( ) ) { if let Some ( g ) = self . p . app . groups . iter ( ) . filter ( | g | ! g . multiple ) . find ( | g | g . id == grp ) { // for g_arg in self.p.app.unroll_args_in_group(&g.name) { //     if &g_arg != name { self . c . insert ( g . id . clone ( ) ) ; //     } // } } } } else if let Some ( g ) = self . p . app . groups . iter ( ) . filter ( | g | ! g . multiple ) . find ( | grp | grp . id == * name ) { debug ! ( " " name ) ; self . c . insert ( g . id . clone ( ) ) ; } } }
Gathers potential conflicts based on used argument, but without considering requirements
and such
Gathers potential conflicts based on used argument but without considering requirements and such
&mut self
matcher
&mut ArgMatcher
&mut self
matcher
&mut ArgMatcher