Prefer Data over NSData

This commit is contained in:
Gwendal Roué committed 2024-07-27 16:37:33 +02:00
1 parent 3f61908e7e
commit 91e1ca4bae
1 file changed
+1 -1
+1 -1
View File
@@ -17,7 +17,7 @@ extension NSUUID: DatabaseValueConvertible {
var uuidBytes = ContiguousArray(repeating: UInt8(0), count: 16)
return uuidBytes.withUnsafeMutableBufferPointer { buffer in
getBytes(buffer.baseAddress!)
return NSData(bytes: buffer.baseAddress, length: 16).databaseValue
return Data(bytes: buffer.baseAddress!, count: 16).databaseValue
}
}