@@ -15,7 +15,7 @@ use serde::{
1515
1616use self :: options:: * ;
1717use 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