Skip to content

Commit c30f28a

Browse files
committed
Foundation: replace unsafeBitCast (NFC)
Use the `UnsafePointer<Int8>` constructor rather than the `unsafeBitCast`. NFCI.
1 parent 12ee2c8 commit c30f28a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/NSString.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ open class NSString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSC
298298
}
299299
if type(of: self) == NSString.self || type(of: self) == NSMutableString.self {
300300
if _storage._guts._isContiguousASCII {
301-
return unsafeBitCast(_storage._guts.startASCII, to: UnsafePointer<Int8>.self)
301+
return UnsafePointer<Int8>(_storage._guts.startASCII);
302302
}
303303
}
304304
return nil

0 commit comments

Comments
 (0)