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<()> {
43
43
44
44
let mut results = my_coll. aggregate ( age_pipeline, None ) . await ?;
45
45
while let Some ( result) = results. try_next ( ) . await ? {
46
- let doc = bson:: from_document ( result) ?;
47
- println ! ( "* {}" , doc) ;
46
+ println ! ( "* {}" , result) ;
48
47
}
49
48
// end-age-agg
50
49
@@ -58,8 +57,7 @@ async fn main() -> mongodb::error::Result<()> {
58
57
59
58
let mut results = my_coll. aggregate ( last_active_pipeline, None ) . await ?;
60
59
while let Some ( result) = results. try_next ( ) . await ? {
61
- let doc = bson:: from_document ( result) ?;
62
- println ! ( "* {}" , doc) ;
60
+ println ! ( "* {}" , result) ;
63
61
}
64
62
// end-lastactive-agg
65
63
@@ -73,8 +71,7 @@ async fn main() -> mongodb::error::Result<()> {
73
71
74
72
let mut results = my_coll. aggregate ( popularity_pipeline, None ) . await ?;
75
73
while let Some ( result) = results. try_next ( ) . await ? {
76
- let doc = bson:: from_document ( result) ?;
77
- println ! ( "* {}" , doc) ;
74
+ println ! ( "* {}" , result) ;
78
75
}
79
76
// end-popular-agg
80
77
You can’t perform that action at this time.
0 commit comments