From eb6895207e1f2f1bcfacaced4986eabc9df4e00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 30 Jul 2021 16:14:03 +0200 Subject: [PATCH] Remove Swiftlint warnings --- GRDB/Core/Configuration.swift | 6 +++--- GRDB/Core/Database.swift | 4 ++-- GRDB/Core/Statement.swift | 2 +- GRDB/Core/TransactionObserver.swift | 4 ++-- GRDB/ValueObservation/ValueObservation.swift | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/GRDB/Core/Configuration.swift b/GRDB/Core/Configuration.swift index 419124339..d40748439 100644 --- a/GRDB/Core/Configuration.swift +++ b/GRDB/Core/Configuration.swift @@ -9,12 +9,12 @@ public struct Configuration { /// If true, foreign key constraints are checked. /// /// Default: true - public var foreignKeysEnabled: Bool = true + public var foreignKeysEnabled = true /// If true, database modifications are disallowed. /// /// Default: false - public var readonly: Bool = false + public var readonly = false /// The configuration label. /// @@ -175,7 +175,7 @@ public struct Configuration { /// never allow leaving a transaction opened at the end of a read access. /// /// Default: false - public var allowsUnsafeTransactions: Bool = false + public var allowsUnsafeTransactions = false // MARK: - Concurrency diff --git a/GRDB/Core/Database.swift b/GRDB/Core/Database.swift index 59cc353b5..9a607d73d 100644 --- a/GRDB/Core/Database.swift +++ b/GRDB/Core/Database.swift @@ -163,7 +163,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib /// If true, select statement execution is recorded. /// Use recordingSelectedRegion(_:), see `statementWillExecute(_:)` - var _isRecordingSelectedRegion: Bool = false + var _isRecordingSelectedRegion = false var _selectedRegion = DatabaseRegion() /// Support for checkForAbortedTransaction() @@ -183,7 +183,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib private var functions = Set() private var collations = Set() private var _readOnlyDepth = 0 // Modify with beginReadOnly/endReadOnly - private var isClosed: Bool = false + private var isClosed = false // MARK: - Initializer diff --git a/GRDB/Core/Statement.swift b/GRDB/Core/Statement.swift index f49346770..19fc6e601 100644 --- a/GRDB/Core/Statement.swift +++ b/GRDB/Core/Statement.swift @@ -46,7 +46,7 @@ public final class Statement { /// If true, the database schema cache gets invalidated after this statement /// is executed. - private(set) var invalidatesDatabaseSchemaCache: Bool = false + private(set) var invalidatesDatabaseSchemaCache = false private(set) var transactionEffect: TransactionEffect? private(set) var databaseEventKinds: [DatabaseEventKind] = [] diff --git a/GRDB/Core/TransactionObserver.swift b/GRDB/Core/TransactionObserver.swift index dc480cb4c..129c55153 100644 --- a/GRDB/Core/TransactionObserver.swift +++ b/GRDB/Core/TransactionObserver.swift @@ -164,7 +164,7 @@ class DatabaseObservationBroker { private var statementObservations: [StatementObservation] = [] { didSet { observesDatabaseChanges = !statementObservations.isEmpty } } - private var observesDatabaseChanges: Bool = false { + private var observesDatabaseChanges = false { didSet { if observesDatabaseChanges == oldValue { return } if observesDatabaseChanges { @@ -796,7 +796,7 @@ final class TransactionObservation { // A disabled observation is not interested in individual database changes. // It is still interested in transactions commits & rollbacks. - var isDisabled: Bool = false + var isDisabled = false private weak var weakObserver: TransactionObserver? private var strongObserver: TransactionObserver? diff --git a/GRDB/ValueObservation/ValueObservation.swift b/GRDB/ValueObservation/ValueObservation.swift index 0be571ac3..b600b379b 100644 --- a/GRDB/ValueObservation/ValueObservation.swift +++ b/GRDB/ValueObservation/ValueObservation.swift @@ -32,7 +32,7 @@ public struct ValueObservation { /// /// Don't set this flag to true unless you really need it. A read/write /// observation is less efficient than a read-only observation. - public var requiresWriteAccess: Bool = false + public var requiresWriteAccess = false /// Returns a ValueObservation with a transformed reducer. func mapReducer(_ transform: @escaping (Reducer) -> R) -> ValueObservation {