pub fn merge(self, other: ArgParseRes<Res>) -> ArgParseRes<Res> {
        match (self, other) {
            (me @ ArgParseRes::Parsed(_), _other) => me,
            (_me, other @ ArgParseRes::Parsed(_)) => other,
            (
                ArgParseRes::Failed {
                    parsed_up_to: me_parsed_up_to,
                    reason: mut me_reason,
                },
                ArgParseRes::Failed {
                    parsed_up_to: other_parsed_up_to,
                    reason: mut other_reason,
                },
            ) => match me_parsed_up_to.cmp(&other_parsed_up_to) {
                Ordering::Less => ArgParseRes::Failed {
                    parsed_up_to: other_parsed_up_to,
                    reason: other_reason,
                },
                Ordering::Greater => ArgParseRes::Failed {
                    parsed_up_to: me_parsed_up_to,
                    reason: me_reason,
                },
                Ordering::Equal => {
                    me_reason.append(&mut other_reason);
                    ArgParseRes::Failed {
                        parsed_up_to: me_parsed_up_to,
                        reason: me_reason,
                    }
                }
            },
        }
    }
/// Combines two `ArgParseRes` results, giving `self` preference in case
/// they are considered equal.
///
/// `Parsed` is preferred over any kind of failure.  One failure is
/// preferred over another if the first happened at a later position.
///
/// When multiple failures happen at the same position, their reasons are
/// combined.
Combines two `ArgParseRes` results, giving `self` preference in case
they are considered equal.

`Parsed` is preferred over any kind of failure.  One failure is
preferred over another if the first happened at a later position.

When multiple failures happen at the same position, their reasons are
combined.
Combines two ` ArgParseRes ` results giving ` self ` preference in case they are considered equal . ` Parsed ` is preferred over any kind of failure . One failure is preferred over another if the first happened at a later position . When multiple failures happen at the same position their reasons are combined .
pub fn merge(self, other: ArgParseRes<Res>) -> ArgParseRes<Res> {
        match (self, other) {
            (me @ ArgParseRes::Parsed(_), _other) => me,
            (_me, other @ ArgParseRes::Parsed(_)) => other,
            (
                ArgParseRes::Failed {
                    parsed_up_to: me_parsed_up_to,
                    reason: mut me_reason,
                },
                ArgParseRes::Failed {
                    parsed_up_to: other_parsed_up_to,
                    reason: mut other_reason,
                },
            ) => match me_parsed_up_to.cmp(&other_parsed_up_to) {
                Ordering::Less => ArgParseRes::Failed {
                    parsed_up_to: other_parsed_up_to,
                    reason: other_reason,
                },
                Ordering::Greater => ArgParseRes::Failed {
                    parsed_up_to: me_parsed_up_to,
                    reason: me_reason,
                },
                Ordering::Equal => {
                    me_reason.append(&mut other_reason);
                    ArgParseRes::Failed {
                        parsed_up_to: me_parsed_up_to,
                        reason: me_reason,
                    }
                }
            },
        }
    }
pub fn merge ( self , other : ArgParseRes < Res > ) -> ArgParseRes < Res > { match ( self , other ) { ( me @ ArgParseRes :: Parsed ( _ ) , _other ) => me , ( _me , other @ ArgParseRes :: Parsed ( _ ) ) => other , ( ArgParseRes :: Failed { parsed_up_to : me_parsed_up_to , reason : mut me_reason , } , ArgParseRes :: Failed { parsed_up_to : other_parsed_up_to , reason : mut other_reason , } , ) => match me_parsed_up_to . cmp ( & other_parsed_up_to ) { Ordering :: Less => ArgParseRes :: Failed { parsed_up_to : other_parsed_up_to , reason : other_reason , } , Ordering :: Greater => ArgParseRes :: Failed { parsed_up_to : me_parsed_up_to , reason : me_reason , } , Ordering :: Equal => { me_reason . append ( & mut other_reason ) ; ArgParseRes :: Failed { parsed_up_to : me_parsed_up_to , reason : me_reason , } } } , } }
Combines two `ArgParseRes` results, giving `self` preference in case
they are considered equal.
Combines two ` ArgParseRes ` results giving ` self ` preference in case they are considered equal .
self
other
ArgParseRes<Res>