tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 501HTML 254C 19JavaScript 81414 Sutichaykuna

⎇ 5a673b4ef8ee674c7e5c2280de7b1e7a7d12745a src/ref_eq.rs Rust · 5 siq'ikuna · 186 B Ñawpa willay Pi imata llamkarqan ch'uya

Add (nightly) no_std support 54613f944 · Maximilian Goisser ·

1/// Determine if two borrowed pointers point to the same thing.
2#[inline]
3pub fn ref_eq<'a, 'b, T>(thing: &'a T, other: &'b T) -> bool {
4    (thing as *const T) == (other as *const T)
5}