easy_node 0.5.1

Smart pointer for graph nodes.
Documentation
1
2
3
4
5
6
7
8
9
10
//! Crate's utility.

use std::cmp::Ordering;

/// Compare two pointers.
pub fn cmp_ptr<X: ?Sized, Y: ?Sized>(x: *const X, y: *const Y) -> Ordering {
    let x = x.cast::<()>();
    let y = y.cast::<()>();
    x.cmp(&y)
}