Skip to content

Commit d4d1f96

Browse files
committed
fix: dead code and unused imports
1 parent 148e37d commit d4d1f96

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mongod/src/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,17 @@ pub enum Kind {
119119
}
120120

121121
// Helpers
122+
#[allow(dead_code)]
122123
pub(crate) fn bson<E: Into<Source>>(e: E) -> Error {
123124
Error::new(Kind::Bson).with(e)
124125
}
125126

127+
#[allow(dead_code)]
126128
pub(crate) fn builder<E: Into<Source>>(e: E) -> Error {
127129
Error::new(Kind::Builder).with(e)
128130
}
129131

132+
#[allow(dead_code)]
130133
pub(crate) fn mongodb<E: Into<Source>>(e: E) -> Error {
131134
Error::new(Kind::Mongodb).with(e)
132135
}

mongod/src/query/insert.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::collections::HashMap;
22
use std::marker::PhantomData;
33

4-
use bson::{Bson, Document};
4+
use bson::Bson;
55
use mongodb::options::{InsertManyOptions, WriteConcern};
66

77
use crate::collection::Collection;
@@ -128,7 +128,7 @@ impl<C: Collection> Insert<C> {
128128
let documents = documents
129129
.into_iter()
130130
.map(|s| bson::to_document(&s))
131-
.collect::<Result<Vec<Document>, _>>()
131+
.collect::<Result<Vec<bson::Document>, _>>()
132132
.map_err(crate::error::bson)?;
133133
let resp = client.execute(crate::blocking::Request::Insert(
134134
C::COLLECTION,

0 commit comments

Comments
 (0)