Explorar o código

Remove the construction of the UnsafePointer

Remove the unnecessary construction of the UnsafePointer as the `sterror` returns a `UnsafeMutablePointer<Int8>!`
Victor Sigler %!s(int64=7) %!d(string=hai) anos
pai
achega
16f3d4272d
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Sources/Errno.swift

+ 2 - 1
Sources/Errno.swift

@@ -10,6 +10,7 @@ import Foundation
 public class Errno {
     
     public class func description() -> String {
-        return String(cString: UnsafePointer(strerror(errno)))
+        // https://forums.developer.apple.com/thread/113919
+        return String(cString: strerror(errno))
     }
 }