Skip to content

Commit 5e19f9b

Browse files
Revert "Force non-human readable serialization in collections (#919)"
This reverts commit 662248b.
1 parent 290595b commit 5e19f9b

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/coll/mod.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use serde::{
1515

1616
use self::options::*;
1717
use crate::{
18-
bson::{doc, to_document_with_options, Bson, Document, SerializerOptions},
18+
bson::{doc, to_document, Bson, Document},
1919
bson_util,
2020
change_stream::{
2121
event::ChangeStreamEvent,
@@ -1119,10 +1119,7 @@ where
11191119
options: impl Into<Option<FindOneAndReplaceOptions>>,
11201120
session: impl Into<Option<&mut ClientSession>>,
11211121
) -> Result<Option<T>> {
1122-
let replacement = to_document_with_options(
1123-
replacement.borrow(),
1124-
SerializerOptions::builder().human_readable(false).build(),
1125-
)?;
1122+
let replacement = to_document(replacement.borrow())?;
11261123

11271124
let session = session.into();
11281125

@@ -1382,10 +1379,7 @@ where
13821379
options: impl Into<Option<ReplaceOptions>>,
13831380
session: impl Into<Option<&mut ClientSession>>,
13841381
) -> Result<UpdateResult> {
1385-
let replacement = to_document_with_options(
1386-
replacement.borrow(),
1387-
SerializerOptions::builder().human_readable(false).build(),
1388-
)?;
1382+
let replacement = to_document(replacement.borrow())?;
13891383

13901384
bson_util::replacement_document_check(&replacement)?;
13911385

0 commit comments

Comments
 (0)