@@ -15,7 +15,7 @@ use serde::{
15
15
16
16
use self :: options:: * ;
17
17
use crate :: {
18
- bson:: { doc, to_document_with_options , Bson , Document , SerializerOptions } ,
18
+ bson:: { doc, to_document , Bson , Document } ,
19
19
bson_util,
20
20
change_stream:: {
21
21
event:: ChangeStreamEvent ,
@@ -1119,10 +1119,7 @@ where
1119
1119
options : impl Into < Option < FindOneAndReplaceOptions > > ,
1120
1120
session : impl Into < Option < & mut ClientSession > > ,
1121
1121
) -> 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 ( ) ) ?;
1126
1123
1127
1124
let session = session. into ( ) ;
1128
1125
@@ -1382,10 +1379,7 @@ where
1382
1379
options : impl Into < Option < ReplaceOptions > > ,
1383
1380
session : impl Into < Option < & mut ClientSession > > ,
1384
1381
) -> 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 ( ) ) ?;
1389
1383
1390
1384
bson_util:: replacement_document_check ( & replacement) ?;
1391
1385
0 commit comments