Updated for the latest rust.
Using handy fixed ptr as_ref method.