Skip to content

Commit 4778110

Browse files
committed
style
1 parent 6d3e97e commit 4778110

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

FIRAllocatedUnfairLock.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import os.lock
2020
/// on why this is necessary, see the docs:
2121
/// https://developer.apple.com/documentation/os/osallocatedunfairlock
2222
public final class FIRAllocatedUnfairLock<State>: @unchecked Sendable {
23-
2423
private var lockPointer: UnsafeMutablePointer<os_unfair_lock>
2524
private var state: State
2625

@@ -43,14 +42,14 @@ public final class FIRAllocatedUnfairLock<State>: @unchecked Sendable {
4342
os_unfair_lock_unlock(lockPointer)
4443
}
4544

46-
public func withLock<R>(_ body: (inout State) throws -> R) rethrows -> R where R : Sendable {
45+
public func withLock<R>(_ body: (inout State) throws -> R) rethrows -> R where R: Sendable {
4746
let value: R
4847
lock(); defer { unlock() }
4948
value = try body(&state)
5049
return value
5150
}
5251

53-
public func withLock<R>(_ body: () throws -> R) rethrows -> R where R : Sendable {
52+
public func withLock<R>(_ body: () throws -> R) rethrows -> R where R: Sendable {
5453
let value: R
5554
lock(); defer { unlock() }
5655
value = try body()
@@ -60,5 +59,4 @@ public final class FIRAllocatedUnfairLock<State>: @unchecked Sendable {
6059
deinit {
6160
lockPointer.deallocate()
6261
}
63-
6462
}

FirebaseAuth/Sources/Swift/Auth/AuthComponent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import Foundation
1717
import FirebaseAppCheckInterop
1818
import FirebaseAuthInterop
1919
import FirebaseCore
20-
import FirebaseCoreInternal
2120
import FirebaseCoreExtension
21+
import FirebaseCoreInternal
2222

2323
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
2424
@objc(FIRAuthComponent)

FirebaseFunctions/Sources/Callable+Codable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public extension Callable where Request: Sendable, Response: Sendable {
282282
// `StreamResponseProtocol`, we know the `Response` generic argument
283283
// is `StreamResponse<_, _>`.
284284
let responseJSON = switch response {
285-
case .message(let json), .result(let json): json
285+
case let .message(json), let .result(json): json
286286
}
287287
let response = try decoder.decode(Response.self, from: responseJSON)
288288
if response is StreamResponseProtocol {

FirebaseStorage/Sources/Storage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ import FirebaseCore
249249
private var instances: [String: Storage] = [:]
250250

251251
/// Lock to manage access to the instances array to avoid race conditions.
252-
private let instancesLock = FirebaseCoreInternal.FIRAllocatedUnfairLock<Void>()
252+
private let instancesLock = FirebaseCoreInternal.FIRAllocatedUnfairLock<Void>()
253253

254254
private init() {}
255255

0 commit comments

Comments
 (0)