Skip to content

Commit 13ee4a5

Browse files
committed
update for conflicts
1 parent 602c24e commit 13ee4a5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

source/includes/fundamentals/code-snippets/aggregation.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)