-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Minor - P4
-
None
-
Affects Version/s: 1.1.1
-
Component/s: None
-
Labels:
The show_record_id filter does not seem to do anything.
Unable to find source-code formatter for language: rust. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
use mongodb::bson::doc; use mongodb::sync::Client; fn main() { let client = Client::with_uri_str("mongodb://localhost:27017").unwrap(); let db = client.database("test"); db.collection("test") .insert_one(doc! {"msg": "hi"}, None) .unwrap(); let find_opts = mongodb::options::FindOptions::builder() .show_record_id(false) .build(); let cursor = db.collection("test").find(None, find_opts).unwrap(); println!("{:#?}", cursor.last()); }
output:
Some( Ok( Document({"_id": ObjectId(ObjectId(5fa27b140040f3f40013ae1e)), "msg": String("hi")}), ), )