pub fn opt_ptr_eq<T>(a: Option<&T>, b: Option<&T>) -> bool
Surprisingly, there’s no way in Rust to do a ptr::eq on Option<&T>. Uses unsafe so that the debug performance isn’t too bad.
ptr::eq
Option<&T>
unsafe