Skip to content

Commit 504543d

Browse files
committed
Appease clippy
1 parent 6ca12bd commit 504543d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

objc2-foundation/src/__string_macro.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ impl CFConstString {
9090

9191
#[inline]
9292
pub const fn as_nsstring(&self) -> &NSString {
93-
unsafe { &*(self as *const Self as *const NSString) }
93+
let ptr: *const Self = self;
94+
unsafe { &*ptr.cast::<NSString>() }
9495
}
9596
}
9697

0 commit comments

Comments
 (0)