File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -119,14 +119,17 @@ pub enum Kind {
119
119
}
120
120
121
121
// Helpers
122
+ #[ allow( dead_code) ]
122
123
pub ( crate ) fn bson < E : Into < Source > > ( e : E ) -> Error {
123
124
Error :: new ( Kind :: Bson ) . with ( e)
124
125
}
125
126
127
+ #[ allow( dead_code) ]
126
128
pub ( crate ) fn builder < E : Into < Source > > ( e : E ) -> Error {
127
129
Error :: new ( Kind :: Builder ) . with ( e)
128
130
}
129
131
132
+ #[ allow( dead_code) ]
130
133
pub ( crate ) fn mongodb < E : Into < Source > > ( e : E ) -> Error {
131
134
Error :: new ( Kind :: Mongodb ) . with ( e)
132
135
}
Original file line number Diff line number Diff line change 1
1
use std:: collections:: HashMap ;
2
2
use std:: marker:: PhantomData ;
3
3
4
- use bson:: { Bson , Document } ;
4
+ use bson:: Bson ;
5
5
use mongodb:: options:: { InsertManyOptions , WriteConcern } ;
6
6
7
7
use crate :: collection:: Collection ;
@@ -128,7 +128,7 @@ impl<C: Collection> Insert<C> {
128
128
let documents = documents
129
129
. into_iter ( )
130
130
. map ( |s| bson:: to_document ( & s) )
131
- . collect :: < Result < Vec < Document > , _ > > ( )
131
+ . collect :: < Result < Vec < bson :: Document > , _ > > ( )
132
132
. map_err ( crate :: error:: bson) ?;
133
133
let resp = client. execute ( crate :: blocking:: Request :: Insert (
134
134
C :: COLLECTION ,
You can’t perform that action at this time.
0 commit comments