mongo-rust-driver icon indicating copy to clipboard operation
mongo-rust-driver copied to clipboard

Cannot fetch data using find and find_one

Open 0xhiro opened this issue 3 years ago • 0 comments

Versions/Environment

  1. Rust Version : rustc 1.62.1
  2. MacOS
  3. Mongodb = 2.3.0 bson = 2.4.0
  4. 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" })

0xhiro avatar Aug 15 '22 00:08 0xhiro