// This function is a bit of a hack. We use it for sorting, but not for
// equality, in the hopes that we'll get better results in the presence
// of overloading, while still coping with changed function signatures.
// TODO: do something smarter
This function is a bit of a hack. We use it for sorting, but not for
equality, in the hopes that we'll get better results in the presence
of overloading, while still coping with changed function signatures.
TODO: do something smarter
This function is a bit of a hack . We use it for sorting but not for equality in the hopes that we ' ll get better results in the presence of overloading while still coping with changed function signatures . TODO : do something smarter
fn cmp_id_for_sort(
        hash_a: &FileHash,
        a: &Self,
        hash_b: &FileHash,
        b: &Self,
        _options: &Options,
    ) -> cmp::Ordering {
        let ord = Function::cmp_id(hash_a, a, hash_b, b);
        if ord != cmp::Ordering::Equal {
            return ord;
        }
        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;
            }
        }
        a.parameters().len().cmp(&b.parameters().len())
    }
fn cmp_id_for_sort ( hash_a : & FileHash , a : & Self , hash_b : & FileHash , b : & Self , _options : & Options , ) -> cmp :: Ordering { let ord = Function :: cmp_id ( hash_a , a , hash_b , b ) ; if ord != cmp :: Ordering :: Equal { return ord ; } 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 ; } } a . parameters ( ) . len ( ) . cmp ( & b . parameters ( ) . len ( ) ) }
This function is a bit of a hack.
This function is a bit of a hack .
hash_a
&FileHash
a
&Self
hash_b
&FileHash
b
&Self
_options
&Options