Fix Swiftlint warnings

This commit is contained in:
Gwendal Roué committed 2024-07-28 13:59:38 +02:00
1 parent 8df18fb82b
commit 19c3de96dd
3 files changed
+3 -3

No files matched your search

@@ -129,7 +129,7 @@ private class DatabaseValueEncoder: Encoder {
// eventually perform JSON decoding.
// TODO: possible optimization: avoid this conversion to string,
// and store raw data bytes as an SQLite string
let jsonString = String(data: jsonData, encoding: .utf8)!
let jsonString = String(decoding: jsonData, as: UTF8.self)
try jsonString.encode(to: self)
}
}
+1 -1
View File
@@ -171,7 +171,7 @@ struct SQLRelation: Sendable {
var source: SQLSource
var selectionPromise: DatabasePromise<[SQLSelection]>
var filterPromise: DatabasePromise<SQLExpression>?
var ordering: SQLRelation.Ordering = SQLRelation.Ordering()
var ordering = SQLRelation.Ordering()
var ctes: OrderedDictionary<String, SQLCTE> = [:] // See also `allCTEs`
var children: OrderedDictionary<String, Child> = [:]
+1 -1
View File
@@ -150,7 +150,7 @@ private class RecordEncoder<Record: EncodableRecord>: Encoder {
// eventually perform JSON decoding.
// TODO: possible optimization: avoid this conversion to string,
// and store raw data bytes as an SQLite string
let jsonString = String(data: jsonData, encoding: .utf8)!
let jsonString = String(decoding: jsonData, as: UTF8.self)
persist(jsonString, forKey: key)
}
}