We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec67468 commit 14afd20Copy full SHA for 14afd20
Sources/MongoSwift/BSON/BSONDocumentIterator.swift
@@ -36,7 +36,7 @@ public class BSONDocumentIterator: IteratorProtocol {
36
37
let initialized = self.withMutableBSONIterPointer { iterPtr in
38
self.document.withBSONPointer { docPtr in
39
- bson_iter_init_find(iterPtr, docPtr, key.cString(using: .utf8))
+ bson_iter_init_find(iterPtr, docPtr, key)
40
}
41
42
@@ -56,7 +56,7 @@ public class BSONDocumentIterator: IteratorProtocol {
56
/// Moves the iterator to the specified key. Returns false if the key does not exist. Returns true otherwise.
57
internal func move(to key: String) -> Bool {
58
self.withMutableBSONIterPointer { iterPtr in
59
- bson_iter_find(iterPtr, key.cString(using: .utf8))
+ bson_iter_find(iterPtr, key)
60
61
62
0 commit comments