Skip to content

Commit 8651f13

Browse files
committed
update doctests for bson3
1 parent ef8beae commit 8651f13

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

driver/src/change_stream/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ where
8383
/// # let mut session = client.start_session().await?;
8484
/// let mut cs = coll.watch().session(&mut session).await?;
8585
/// while let Some(event) = cs.next(&mut session).await? {
86-
/// let id = bson::to_bson(&event.id)?;
86+
/// let id = bson::serialize_to_bson(&event.id)?;
8787
/// other_coll.insert_one(doc! { "id": id }).session(&mut session).await?;
8888
/// }
8989
/// # Ok::<(), mongodb::error::Error>(())

driver/src/sync/change_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ where
190190
/// # let mut session = client.start_session().run()?;
191191
/// let mut cs = coll.watch().session(&mut session).run()?;
192192
/// while let Some(event) = cs.next(&mut session)? {
193-
/// let id = bson::to_bson(&event.id)?;
193+
/// let id = bson::serialize_to_bson(&event.id)?;
194194
/// other_coll.insert_one(doc! { "id": id }).session(&mut session).run()?;
195195
/// }
196196
/// # Ok::<(), mongodb::error::Error>(())

0 commit comments

Comments
 (0)