fmt: update use of *T to *const T

`*T` is now `*const T`; updated pointer comparison accordingly.