Skip to content

Commit 0f0d84a

Browse files
Fix RunCommand construction for bulk write killCursors (#1364)
1 parent f258c21 commit 0f0d84a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/operation/bulk_write.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use futures_core::TryStream;
66
use futures_util::{FutureExt, TryStreamExt};
77

88
use crate::{
9-
bson::{doc, rawdoc, Bson, RawDocumentBuf},
9+
bson::{rawdoc, Bson, RawDocumentBuf},
1010
bson_util::{self, extend_raw_document_buf},
1111
checked::Checked,
1212
cmap::{Command, RawCommandResponse, StreamDescription},
@@ -121,12 +121,12 @@ where
121121
Ok(response) => response,
122122
Err(error) => {
123123
if !error.is_network_error() {
124-
let kill_cursors = doc! {
125-
"killCursors": &namespace.db,
124+
let kill_cursors = rawdoc! {
125+
"killCursors": namespace.db.clone(),
126126
"cursors": [cursor_specification.info.id],
127127
};
128128
let mut run_command =
129-
RunCommand::new(namespace.db.clone(), kill_cursors, None, None)?;
129+
RunCommand::new(namespace.db.clone(), kill_cursors, None, None);
130130
let _ = self
131131
.client
132132
.execute_operation_on_connection(

0 commit comments

Comments
 (0)