fn check_offer_target_is_not_source(
    target: &Option<fsys::Ref>,
    source: &Option<fsys::Ref>,
    decl_type: &str,
    errors: &mut Vec<Error>,
) -> bool {
    match (source, target) {
        (Some(fsys::Ref::Child(ref source_child)), Some(fsys::Ref::Child(ref target_child))) => {
            if source_child.name == target_child.name {
                errors.push(Error::offer_target_equals_source(decl_type, &target_child.name));
                return false;
            }
        }
        _ => {}
    };
    true
}
/// Checks that the offer target is not the same as the offer source.
Checks that the offer target is not the same as the offer source.
Checks that the offer target is not the same as the offer source .
fn check_offer_target_is_not_source(
    target: &Option<fsys::Ref>,
    source: &Option<fsys::Ref>,
    decl_type: &str,
    errors: &mut Vec<Error>,
) -> bool {
    match (source, target) {
        (Some(fsys::Ref::Child(ref source_child)), Some(fsys::Ref::Child(ref target_child))) => {
            if source_child.name == target_child.name {
                errors.push(Error::offer_target_equals_source(decl_type, &target_child.name));
                return false;
            }
        }
        _ => {}
    };
    true
}
fn check_offer_target_is_not_source ( target : & Option < fsys :: Ref > , source : & Option < fsys :: Ref > , decl_type : & str , errors : & mut Vec < Error > , ) -> bool { match ( source , target ) { ( Some ( fsys :: Ref :: Child ( ref source_child ) ) , Some ( fsys :: Ref :: Child ( ref target_child ) ) ) => { if source_child . name == target_child . name { errors . push ( Error :: offer_target_equals_source ( decl_type , & target_child . name ) ) ; return false ; } } _ => { } } ; true }
Checks that the offer target is not the same as the offer source.
Checks that the offer target is not the same as the offer source .
target
&Option<fsys::Ref>
source
&Option<fsys::Ref>
decl_type
&str
errors
&mut Vec<Error>
target
&Option<fsys::Ref>
source
&Option<fsys::Ref>
decl_type
&str
errors
&mut Vec<Error>