fn compare_equal<T: ?Sized>(object: *const T) {
    // Check Ord::cmp().
    assert_eq!(object.cmp(&object), Ordering::Equal);

    // Check relation operations that should return true.
    assert!(object <= object);
    assert!(object >= object);
    assert!(object == object);

    // Check relation operations that should return false.
    assert!(!(object > object));
    assert!(!(object < object));
    assert!(!(object != object));

    // Check Ord::{max, min}.
    assert_eq!(object.min(object), object);
    assert_eq!(object.max(object), object);
}
/// Check comparison operators for the same object.
Check comparison operators for the same object.
Check comparison operators for the same object .
fn compare_equal<T: ?Sized>(object: *const T) {
    // Check Ord::cmp().
    assert_eq!(object.cmp(&object), Ordering::Equal);
    // Check relation operations that should return true.
    assert!(object <= object);
    assert!(object >= object);
    assert!(object == object);
    // Check relation operations that should return false.
    assert!(!(object > object));
    assert!(!(object < object));
    assert!(!(object != object));
    // Check Ord::{max, min}.
    assert_eq!(object.min(object), object);
    assert_eq!(object.max(object), object);
}
fn compare_equal < T : ? Sized > ( object : * const T ) { // Check Ord::cmp(). assert_eq ! ( object cmp ( object ) Ordering Equal ) ; // Check relation operations that should return true. assert ! ( object object ) ; assert ! ( object object ) ; assert ! ( object object ) ; // Check relation operations that should return false. assert ! ( ( object object ) ) ; assert ! ( ( object object ) ) ; assert ! ( ( object object ) ) ; // Check Ord::{max, min}. assert_eq ! ( object min ( object ) object ) ; assert_eq ! ( object max ( object ) object ) ; }
Check comparison operators for the same object.
Check comparison operators for the same object .
object
*const T