fn partial_cmp(&self, other: &QldbHash) -> Option<Ordering> {
        if self.is_empty() {
            if other.is_empty() {
                return Some(Ordering::Equal);
            } else {
                return Some(Ordering::Less);
            }
        }

        if other.is_empty() {
            return Some(Ordering::Greater);
        }

        for (x, y) in self.bytes.iter().rev().zip(other.bytes.iter().rev()) {
            // Note that Java compares bytes as signed integers. We
            // store the bytes as unsigned bytes everywhere and simply
            // re-interpret the bits at this point to determine
            // ordering.
            match (*x as i8).cmp(&(*y as i8)) {
                Ordering::Equal => {}
                cmp => return Some(cmp),
            }
        }

        return Some(Ordering::Equal);
    }
/// Goes through the byte arrays from the last byte to the first. The
/// first bytes that aren't equal determine ordering.
///
/// Note: The byte arrays are always either 0 or `HASH_SIZE`, see
/// the constructor.
Goes through the byte arrays from the last byte to the first. The
first bytes that aren't equal determine ordering.

The byte arrays are always either 0 or `HASH_SIZE`, see
the constructor.
Goes through the byte arrays from the last byte to the first . The first bytes that aren ' t equal determine ordering . The byte arrays are always either 0 or ` HASH_SIZE ` see the constructor .
fn partial_cmp(&self, other: &QldbHash) -> Option<Ordering> {
        if self.is_empty() {
            if other.is_empty() {
                return Some(Ordering::Equal);
            } else {
                return Some(Ordering::Less);
            }
        }
        if other.is_empty() {
            return Some(Ordering::Greater);
        }
        for (x, y) in self.bytes.iter().rev().zip(other.bytes.iter().rev()) {
            // Note that Java compares bytes as signed integers. We
            // store the bytes as unsigned bytes everywhere and simply
            // re-interpret the bits at this point to determine
            // ordering.
            match (*x as i8).cmp(&(*y as i8)) {
                Ordering::Equal => {}
                cmp => return Some(cmp),
            }
        }
        return Some(Ordering::Equal);
    }
fn partial_cmp ( & self , other : & QldbHash ) -> Option < Ordering > { if self . is_empty ( ) { if other . is_empty ( ) { return Some ( Ordering :: Equal ) ; } else { return Some ( Ordering :: Less ) ; } } if other . is_empty ( ) { return Some ( Ordering :: Greater ) ; } for ( x , y ) in self . bytes . iter ( ) . rev ( ) . zip ( other . bytes . iter ( ) . rev ( ) ) { // Note that Java compares bytes as signed integers. We // store the bytes as unsigned bytes everywhere and simply // re-interpret the bits at this point to determine // ordering. match ( * x as i8 ) . cmp ( & ( * y as i8 ) ) { Ordering :: Equal => { } cmp => return Some ( cmp ) , } } return Some ( Ordering :: Equal ) ; }
Goes through the byte arrays from the last byte to the first.
Goes through the byte arrays from the last byte to the first .
&self
other
&QldbHash
&self
other
&QldbHash