File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ internal extension URLSession {
66
66
return . failure( error)
67
67
}
68
68
guard let parseError = error as? ParseError else {
69
- guard JSONSerialization . isValidJSONObject ( responseData) == true ,
69
+ guard JSONSerialization . isValidJSONObject ( responseData) ,
70
70
let json = try ? JSONSerialization
71
71
. data ( withJSONObject: responseData,
72
72
options: . prettyPrinted) else {
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public final class ParseLiveQuery: NSObject {
54
54
//Task
55
55
var task : URLSessionWebSocketTask ! {
56
56
willSet {
57
- if newValue == nil && isSocketEstablished == true {
57
+ if newValue == nil && isSocketEstablished {
58
58
isSocketEstablished = false
59
59
}
60
60
}
@@ -79,7 +79,7 @@ Not attempting to open ParseLiveQuery socket anymore
79
79
}
80
80
var isDisconnectedByUser = false {
81
81
willSet {
82
- if newValue == true {
82
+ if newValue {
83
83
isConnected = false
84
84
}
85
85
}
@@ -110,7 +110,7 @@ Not attempting to open ParseLiveQuery socket anymore
110
110
/// True if the connection to the url is up and available. False otherwise.
111
111
public internal( set) var isSocketEstablished = false { //URLSession has an established socket
112
112
willSet {
113
- if newValue == false {
113
+ if ! newValue {
114
114
isConnected = newValue
115
115
}
116
116
}
Original file line number Diff line number Diff line change @@ -1074,7 +1074,7 @@ extension ParseUser {
1074
1074
}
1075
1075
var mutableSelf = self
1076
1076
if let currentUser = Self . current,
1077
- currentUser. hasSameObjectId ( as: mutableSelf) == true {
1077
+ currentUser. hasSameObjectId ( as: mutableSelf) {
1078
1078
#if !os(Linux) && !os(Android) && !os(Windows)
1079
1079
// swiftlint:disable:next line_length
1080
1080
if let currentUserContainerInKeychain: CurrentUserContainer < BaseParseUser > = try ? KeychainStore . shared. get ( valueFor: ParseStorage . Keys. currentUser) ,
@@ -1103,7 +1103,7 @@ extension ParseUser {
1103
1103
}
1104
1104
var mutableSelf = self
1105
1105
if let currentUser = Self . current,
1106
- currentUser. hasSameObjectId ( as: mutableSelf) == true {
1106
+ currentUser. hasSameObjectId ( as: mutableSelf) {
1107
1107
#if !os(Linux) && !os(Android) && !os(Windows)
1108
1108
// swiftlint:disable:next line_length
1109
1109
if let currentUserContainerInKeychain: CurrentUserContainer < BaseParseUser > = try ? KeychainStore . shared. get ( valueFor: ParseStorage . Keys. currentUser) ,
Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ public struct ParseSwift {
354
354
#if !os(Linux) && !os(Android) && !os(Windows)
355
355
// Clear items out of the Keychain on app first run.
356
356
if UserDefaults . standard. object ( forKey: ParseConstants . bundlePrefix) == nil {
357
- if Self . configuration. isDeletingKeychainIfNeeded == true {
357
+ if Self . configuration. isDeletingKeychainIfNeeded {
358
358
try ? KeychainStore . old. deleteAll ( )
359
359
try ? KeychainStore . shared. deleteAll ( )
360
360
}
Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ public extension Error {
473
473
*/
474
474
func containedIn( _ errorCodes: [ ParseError . Code ] ) -> ParseError ? {
475
475
guard let error = self as? ParseError ,
476
- errorCodes. contains ( error. code) == true else {
476
+ errorCodes. contains ( error. code) else {
477
477
return nil
478
478
}
479
479
return error
You can’t perform that action at this time.
0 commit comments