Replace NonZero<*{const,mut} _> with std::ptr::NonNull

This commit is contained in:
Simon Sapin 2018-01-22 13:05:38 +01:00
parent 52eda6082f
commit 10ec5a2bb0
11 changed files with 42 additions and 50 deletions

View file

@ -67,7 +67,7 @@ pub trait GetRawData {
impl<T: GetLayoutData> GetRawData for T {
fn get_raw_data(&self) -> Option<&StyleAndLayoutData> {
self.get_style_and_layout_data().map(|opaque| {
let container = opaque.ptr.get() as *mut StyleAndLayoutData;
let container = opaque.ptr.as_ptr() as *mut StyleAndLayoutData;
unsafe { &*container }
})
}