Skip to content

Commit 80c8b30

Browse files
committed
More compact version
1 parent d52eaaf commit 80c8b30

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Sources/SQLite/Core/Connection.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,7 @@ public final class Connection {
156156
/// See SQLite [PRAGMA user_version](https://sqlite.org/pragma.html#pragma_user_version)
157157
public var userVersion: Int32? {
158158
get {
159-
guard let userVersion = try? scalar("PRAGMA user_version") as? Int64 else {
160-
return nil
161-
}
162-
return Int32(userVersion)
159+
(try? scalar("PRAGMA user_version") as? Int64).map(Int32.init)
163160
}
164161
set {
165162
if let userVersion = newValue {

0 commit comments

Comments
 (0)