Skip to content

Commit 3dbe672

Browse files
committed
remove unsafe bit cast
1 parent 7306ab0 commit 3dbe672

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FluentPostgreSQL/PostgreSQLDatabase+QuerySupporting.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ extension PostgreSQLDatabase: QuerySupporting {
8282
switch event {
8383
case .willCreate:
8484
if M.ID.self == UUID.self {
85-
model.fluentID = unsafeBitCast(UUID(), to: M.ID.self)
85+
model.fluentID = UUID() as? M.ID
8686
}
8787
case .didCreate:
8888
if M.ID.self == Int.self {

0 commit comments

Comments
 (0)