Remove unused extensions

This commit is contained in:
Timofey Solomko
2018-01-02 17:47:06 +03:00
parent c8d92e56d3
commit d2d74d52b9
-21
View File
@@ -5,27 +5,6 @@
import Foundation
extension Data {
@inline(__always)
func to<T>(type: T.Type) -> T {
return self.withUnsafeBytes { $0.pointee }
}
@inline(__always)
func toArray<T>(type: T.Type, count: Int) -> [T] {
return self.withUnsafeBytes {
[T](UnsafeBufferPointer(start: $0, count: count))
}
}
@inline(__always)
func toArray<T>(type: T.Type) -> [T] {
return self.toArray(type: type, count: self.count / MemoryLayout<T>.size)
}
}
extension UnsignedInteger {
@inline(__always)