Skip to content

Commit a2f9736

Browse files
committed
Switch to using correct form for unsafe type cast
1 parent 79ac432 commit a2f9736

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/NSString.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ open class NSString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSC
301301
}
302302
if type(of: self) == NSString.self || type(of: self) == NSMutableString.self {
303303
if _storage._guts._isContiguousASCII {
304-
return UnsafePointer<Int8>(_storage._guts.startASCII);
304+
return UnsafeRawPointer(_storage._guts.startASCII).assumingMemoryBound(to: Int8.self)
305305
}
306306
}
307307
return nil

0 commit comments

Comments
 (0)