Skip to content

Commit 16f3d42

Browse files
committed
Remove the construction of the UnsafePointer
Remove the unnecessary construction of the UnsafePointer as the `sterror` returns a `UnsafeMutablePointer<Int8>!`
1 parent 82549f1 commit 16f3d42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Errno.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Foundation
1010
public class Errno {
1111

1212
public class func description() -> String {
13-
return String(cString: UnsafePointer(strerror(errno)))
13+
// https://forums.developer.apple.com/thread/113919
14+
return String(cString: strerror(errno))
1415
}
1516
}

0 commit comments

Comments
 (0)