Skip to content

Commit 6a461ef

Browse files
committed
Fix for MSRV
1 parent 601aee8 commit 6a461ef

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/wrappers/win32/h_instance.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ impl HInstance {
3030
}
3131

3232
pub fn addr(&self) -> NonZeroIsize {
33-
self.0.addr().cast_signed()
33+
match NonZeroIsize::new(self.0.as_ptr() as isize) {
34+
Some(addr) => addr,
35+
None => unreachable!(),
36+
}
3437
}
3538
}

0 commit comments

Comments
 (0)