Skip to content

Commit d6053fa

Browse files
committed
Firestore: silence a couple of warnings with newer compilers
This simply silences some conversion warnings with newer compilers that were identified when adding Android support.
1 parent d993d46 commit d6053fa

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Sources/FirebaseFirestore/FirestoreDataConverter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ internal struct FirestoreDataConverter {
108108
}
109109

110110
return firebase.firestore.FieldValue.Map(map)
111-
case is firebase.firestore.FieldValue:
112-
return field as! firebase.firestore.FieldValue
111+
case let field as firebase.firestore.FieldValue:
112+
return field
113113
default:
114114
return nil
115115
}

Sources/FirebaseFirestore/vendor/Codable/DocumentID.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ extension String: DocumentIDWrappable {
4141

4242
extension DocumentReference: DocumentIDWrappable {
4343
public static func wrap(_ documentReference: DocumentReference) throws -> Self {
44-
// Swift complains that values of type DocumentReference cannot be returned
45-
// as Self which is nonsensical. The cast forces this to work.
46-
return documentReference as! Self
44+
return documentReference
4745
}
4846
}
4947

0 commit comments

Comments
 (0)