pub fn cmp_id(
        hash_a: &FileHash,
        a: &FunctionType,
        hash_b: &FileHash,
        b: &FunctionType,
    ) -> cmp::Ordering {
        for (parameter_a, parameter_b) in a.parameters.iter().zip(b.parameters.iter()) {
            let ord = ParameterType::cmp_id(hash_a, parameter_a, hash_b, parameter_b);
            if ord != cmp::Ordering::Equal {
                return ord;
            }
        }

        let ord = a.parameters.len().cmp(&b.parameters.len());
        if ord != cmp::Ordering::Equal {
            return ord;
        }

        match (a.return_type(hash_a), b.return_type(hash_b)) {
            (Some(ref ty_a), Some(ref ty_b)) => {
                let ord = Type::cmp_id(hash_a, ty_a, hash_b, ty_b);
                if ord != cmp::Ordering::Equal {
                    return ord;
                }
            }
            (Some(_), None) => {
                return cmp::Ordering::Less;
            }
            (None, Some(_)) => {
                return cmp::Ordering::Greater;
            }
            (None, None) => {}
        }

        cmp::Ordering::Equal
    }
/// Compare the identifying information of two types.
///
/// Function types are considered equal if they have the same parameter types and
/// return types. Parameter names are ignored.
///
/// This can be used to sort, and to determine if two types refer to the same definition
/// (even if there are differences in the definitions).
Compare the identifying information of two types.
Function types are considered equal if they have the same parameter types and
return types. Parameter names are ignored.

This can be used to sort, and to determine if two types refer to the same definition
(even if there are differences in the definitions).
Compare the identifying information of two types . Function types are considered equal if they have the same parameter types and return types . Parameter names are ignored . This can be used to sort and to determine if two types refer to the same definition ( even if there are differences in the definitions ) .
pub fn cmp_id(
        hash_a: &FileHash,
        a: &FunctionType,
        hash_b: &FileHash,
        b: &FunctionType,
    ) -> cmp::Ordering {
        for (parameter_a, parameter_b) in a.parameters.iter().zip(b.parameters.iter()) {
            let ord = ParameterType::cmp_id(hash_a, parameter_a, hash_b, parameter_b);
            if ord != cmp::Ordering::Equal {
                return ord;
            }
        }
        let ord = a.parameters.len().cmp(&b.parameters.len());
        if ord != cmp::Ordering::Equal {
            return ord;
        }
        match (a.return_type(hash_a), b.return_type(hash_b)) {
            (Some(ref ty_a), Some(ref ty_b)) => {
                let ord = Type::cmp_id(hash_a, ty_a, hash_b, ty_b);
                if ord != cmp::Ordering::Equal {
                    return ord;
                }
            }
            (Some(_), None) => {
                return cmp::Ordering::Less;
            }
            (None, Some(_)) => {
                return cmp::Ordering::Greater;
            }
            (None, None) => {}
        }
        cmp::Ordering::Equal
    }
pub fn cmp_id ( hash_a : & FileHash , a : & FunctionType , hash_b : & FileHash , b : & FunctionType , ) -> cmp :: Ordering { for ( parameter_a , parameter_b ) in a . parameters . iter ( ) . zip ( b . parameters . iter ( ) ) { let ord = ParameterType :: cmp_id ( hash_a , parameter_a , hash_b , parameter_b ) ; if ord != cmp :: Ordering :: Equal { return ord ; } } let ord = a . parameters . len ( ) . cmp ( & b . parameters . len ( ) ) ; if ord != cmp :: Ordering :: Equal { return ord ; } match ( a . return_type ( hash_a ) , b . return_type ( hash_b ) ) { ( Some ( ref ty_a ) , Some ( ref ty_b ) ) => { let ord = Type :: cmp_id ( hash_a , ty_a , hash_b , ty_b ) ; if ord != cmp :: Ordering :: Equal { return ord ; } } ( Some ( _ ) , None ) => { return cmp :: Ordering :: Less ; } ( None , Some ( _ ) ) => { return cmp :: Ordering :: Greater ; } ( None , None ) => { } } cmp :: Ordering :: Equal }
Compare the identifying information of two types.
Compare the identifying information of two types .
hash_a
&FileHash
a
&FunctionType
hash_b
&FileHash
b
&FunctionType
hash_a
&FileHash
a
&FunctionType
hash_b
&FileHash
b
&FunctionType