Skip to content

Commit b15e24a

Browse files
committed
Formatting
1 parent 75f2daf commit b15e24a

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

FirebaseRemoteConfig/Swift/RemoteConfig+Async.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import Foundation
1616

1717
@available(iOS 13.0.0, macOS 10.15.0, macCatalyst 13.0.0, tvOS 13.0.0, watchOS 7.0.0, *)
18-
extension RemoteConfig {
18+
public extension RemoteConfig {
1919
/// Returns an `AsyncThrowingStream` that provides real-time updates to the configuration.
2020
///
2121
/// You can listen for updates by iterating over the stream using a `for try await` loop.
@@ -47,14 +47,14 @@ extension RemoteConfig {
4747
/// }
4848
/// }
4949
/// ```
50-
public var updates: AsyncThrowingStream<RemoteConfigUpdate, Error> {
50+
var updates: AsyncThrowingStream<RemoteConfigUpdate, Error> {
5151
return AsyncThrowingStream { continuation in
5252
let listener = addOnConfigUpdateListener { update, error in
5353
switch (update, error) {
54-
case (let update?, _):
54+
case let (update?, _):
5555
// If there's an update, yield it. We prioritize the update over a potential error.
5656
continuation.yield(update)
57-
case (_, let error?):
57+
case let (_, error?):
5858
// If there's no update but there is an error, terminate the stream with the error.
5959
continuation.finish(throwing: error)
6060
case (nil, nil):

FirebaseRemoteConfig/Tests/Swift/SwiftAPI/AsyncStreamTests.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import XCTest
1615
import FirebaseCore
1716
@testable import FirebaseRemoteConfig
17+
import XCTest
1818

1919
#if SWIFT_PACKAGE
2020
import RemoteConfigFakeConsoleObjC
@@ -30,16 +30,15 @@ class MockListenerRegistration: ConfigUpdateListenerRegistration, @unchecked Sen
3030
}
3131
}
3232

33-
/// A mock for the RCNConfigRealtime component that allows tests to control the config update listener.
33+
/// A mock for the RCNConfigRealtime component that allows tests to control the config update
34+
/// listener.
3435
class MockRealtime: RCNConfigRealtime {
3536
/// The listener closure captured from the `updates` async stream.
3637
var listener: ((RemoteConfigUpdate?, Error?) -> Void)?
3738
let mockRegistration = MockListenerRegistration()
3839

39-
40-
override func addConfigUpdateListener(
41-
_ listener: @escaping (RemoteConfigUpdate?, Error?) -> Void
42-
) -> ConfigUpdateListenerRegistration {
40+
override func addConfigUpdateListener(_ listener: @escaping (RemoteConfigUpdate?, Error?)
41+
-> Void) -> ConfigUpdateListenerRegistration {
4342
self.listener = listener
4443
return mockRegistration
4544
}

0 commit comments

Comments
 (0)