File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
source/includes/fundamentals/code-snippets Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ async fn main() -> mongodb::error::Result<()> {
4343
4444 let mut results = my_coll. aggregate ( age_pipeline, None ) . await ?;
4545 while let Some ( result) = results. try_next ( ) . await ? {
46- let doc = bson:: from_document ( result) ?;
47- println ! ( "* {}" , doc) ;
46+ println ! ( "* {}" , result) ;
4847 }
4948 // end-age-agg
5049
@@ -58,8 +57,7 @@ async fn main() -> mongodb::error::Result<()> {
5857
5958 let mut results = my_coll. aggregate ( last_active_pipeline, None ) . await ?;
6059 while let Some ( result) = results. try_next ( ) . await ? {
61- let doc = bson:: from_document ( result) ?;
62- println ! ( "* {}" , doc) ;
60+ println ! ( "* {}" , result) ;
6361 }
6462 // end-lastactive-agg
6563
@@ -73,8 +71,7 @@ async fn main() -> mongodb::error::Result<()> {
7371
7472 let mut results = my_coll. aggregate ( popularity_pipeline, None ) . await ?;
7573 while let Some ( result) = results. try_next ( ) . await ? {
76- let doc = bson:: from_document ( result) ?;
77- println ! ( "* {}" , doc) ;
74+ println ! ( "* {}" , result) ;
7875 }
7976 // end-popular-agg
8077
You can’t perform that action at this time.
0 commit comments