mongo-rust-driver
mongo-rust-driver copied to clipboard
Cannot fetch data using find and find_one
Versions/Environment
- Rust Version : rustc 1.62.1
- MacOS
- Mongodb = 2.3.0 bson = 2.4.0
- using mongodb serverless cloud
Describe the bug
i cannot read read database data using find or find_one. i get an error
let mut cursor = collection.find(None, None).await.expect("error occured"); while let Some(doc) = cursor.try_next().await.unwrap() { println!("{:?}", doc) }
i get an error that says: BsonDeserialization(DeserializationError { message: "invalid type: map, expected a string" })