Skip to content

Commit 1fcc19a

Browse files
committed
Fix styling
1 parent 8b6ba6a commit 1fcc19a

File tree

4 files changed

+26
-23
lines changed

4 files changed

+26
-23
lines changed

Firestore/Swift/Source/AsyncAwait/DocumentReference+AsyncSequence.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public extension DocumentReference {
5151
public typealias AsyncIterator = Iterator
5252

5353
@usableFromInline
54-
internal let documentReference: DocumentReference
54+
let documentReference: DocumentReference
5555
@usableFromInline
56-
internal let includeMetadataChanges: Bool
56+
let includeMetadataChanges: Bool
5757

5858
/// Creates a new sequence for monitoring document snapshots.
5959
/// - Parameters:
@@ -78,9 +78,9 @@ public extension DocumentReference {
7878
public struct Iterator: AsyncIteratorProtocol {
7979
public typealias Element = DocumentSnapshot
8080
@usableFromInline
81-
internal let stream: AsyncThrowingStream<DocumentSnapshot, Error>
81+
let stream: AsyncThrowingStream<DocumentSnapshot, Error>
8282
@usableFromInline
83-
internal var streamIterator: AsyncThrowingStream<DocumentSnapshot, Error>.Iterator
83+
var streamIterator: AsyncThrowingStream<DocumentSnapshot, Error>.Iterator
8484

8585
/// Initializes the iterator with the provided `DocumentReference` instance.
8686
/// This sets up the `AsyncThrowingStream` and registers the necessary listener.

Firestore/Swift/Source/AsyncAwait/Query+AsyncSequence.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public extension Query {
5353
public typealias AsyncIterator = Iterator
5454

5555
@usableFromInline
56-
internal let query: Query
56+
let query: Query
5757
@usableFromInline
58-
internal let includeMetadataChanges: Bool
58+
let includeMetadataChanges: Bool
5959

6060
/// Creates a new sequence for monitoring query snapshots.
6161
/// - Parameters:
@@ -80,9 +80,9 @@ public extension Query {
8080
public struct Iterator: AsyncIteratorProtocol {
8181
public typealias Element = QuerySnapshot
8282
@usableFromInline
83-
internal let stream: AsyncThrowingStream<QuerySnapshot, Error>
83+
let stream: AsyncThrowingStream<QuerySnapshot, Error>
8484
@usableFromInline
85-
internal var streamIterator: AsyncThrowingStream<QuerySnapshot, Error>.Iterator
85+
var streamIterator: AsyncThrowingStream<QuerySnapshot, Error>.Iterator
8686

8787
/// Initializes the iterator with the provided `Query` instance.
8888
/// This sets up the `AsyncThrowingStream` and registers the necessary listener.

Firestore/Swift/Tests/Unit/AsyncAwait/AsyncSequenceTests.swift

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
import Testing
1817
import FirebaseCore
1918
@testable import FirebaseFirestore
19+
import Testing
2020

2121
// MARK: - Shared Test Helpers
2222

@@ -119,7 +119,8 @@ private struct Swizzler: ~Copyable {
119119
Self.swizzle(cls, originalSelector: swizzled, swizzledSelector: original)
120120
}
121121

122-
private static func swizzle(_ cls: AnyClass, originalSelector: Selector, swizzledSelector: Selector) {
122+
private static func swizzle(_ cls: AnyClass, originalSelector: Selector,
123+
swizzledSelector: Selector) {
123124
guard let originalMethod = class_getInstanceMethod(cls, originalSelector),
124125
let swizzledMethod = class_getInstanceMethod(cls, swizzledSelector) else {
125126
#expect(false, "Failed to get methods for swizzling")
@@ -270,7 +271,8 @@ struct DocumentReferenceAsyncSequenceTests {
270271
let swizzler = Swizzler(
271272
DocumentReference.self,
272273
original: #selector(DocumentReference.addSnapshotListener(includeMetadataChanges:listener:)),
273-
swizzled: #selector(DocumentReference.swizzled_addSnapshotListener(includeMetadataChanges:listener:))
274+
swizzled: #selector(DocumentReference
275+
.swizzled_addSnapshotListener(includeMetadataChanges:listener:))
274276
)
275277
defer { withExtendedLifetime(swizzler) {} }
276278

@@ -299,7 +301,8 @@ struct DocumentReferenceAsyncSequenceTests {
299301
let swizzler = Swizzler(
300302
DocumentReference.self,
301303
original: #selector(DocumentReference.addSnapshotListener(includeMetadataChanges:listener:)),
302-
swizzled: #selector(DocumentReference.swizzled_addSnapshotListener(includeMetadataChanges:listener:))
304+
swizzled: #selector(DocumentReference
305+
.swizzled_addSnapshotListener(includeMetadataChanges:listener:))
303306
)
304307
defer { withExtendedLifetime(swizzler) {} }
305308

@@ -334,7 +337,8 @@ struct DocumentReferenceAsyncSequenceTests {
334337
let swizzler = Swizzler(
335338
DocumentReference.self,
336339
original: #selector(DocumentReference.addSnapshotListener(includeMetadataChanges:listener:)),
337-
swizzled: #selector(DocumentReference.swizzled_addSnapshotListener(includeMetadataChanges:listener:))
340+
swizzled: #selector(DocumentReference
341+
.swizzled_addSnapshotListener(includeMetadataChanges:listener:))
338342
)
339343
defer { withExtendedLifetime(swizzler) {} }
340344

@@ -364,10 +368,9 @@ struct DocumentReferenceAsyncSequenceTests {
364368
// MARK: - Method Swizzling
365369

366370
extension Query {
367-
@objc func swizzled_addSnapshotListener(
368-
includeMetadataChanges: Bool,
369-
listener: @escaping (QuerySnapshot?, Error?) -> Void
370-
) -> ListenerRegistration {
371+
@objc func swizzled_addSnapshotListener(includeMetadataChanges: Bool,
372+
listener: @escaping (QuerySnapshot?, Error?) -> Void)
373+
-> ListenerRegistration {
371374
let key = Unmanaged.passUnretained(QueryAsyncSequenceTests.associationKey).toOpaque()
372375
let actor = objc_getAssociatedObject(self, key) as! TestStateActor<QuerySnapshot>
373376
let registration = MockListenerRegistration(actor: actor)
@@ -380,11 +383,11 @@ extension Query {
380383
}
381384

382385
extension DocumentReference {
383-
@objc func swizzled_addSnapshotListener(
384-
includeMetadataChanges: Bool,
385-
listener: @escaping (DocumentSnapshot?, Error?) -> Void
386-
) -> ListenerRegistration {
387-
let key = Unmanaged.passUnretained(DocumentReferenceAsyncSequenceTests.associationKey).toOpaque()
386+
@objc func swizzled_addSnapshotListener(includeMetadataChanges: Bool,
387+
listener: @escaping (DocumentSnapshot?, Error?) -> Void)
388+
-> ListenerRegistration {
389+
let key = Unmanaged.passUnretained(DocumentReferenceAsyncSequenceTests.associationKey)
390+
.toOpaque()
388391
let actor = objc_getAssociatedObject(self, key) as! TestStateActor<DocumentSnapshot>
389392
let registration = MockListenerRegistration(actor: actor)
390393
let wrapper = SendableListenerWrapper(listener)

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,7 @@ func firestoreTargets() -> [Target] {
15571557
dependencies: [
15581558
"Firebase",
15591559
"FirebaseCore",
1560-
"FirebaseFirestoreTarget"
1560+
"FirebaseFirestoreTarget",
15611561
],
15621562
path: "Firestore/Swift/Tests/Unit",
15631563
cSettings: [

0 commit comments

Comments
 (0)