File tree 8 files changed +420
-342
lines changed
8 files changed +420
-342
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ pub mod options;
3
3
use std:: { fmt:: Debug , sync:: Arc } ;
4
4
5
5
use futures_util:: stream:: TryStreamExt ;
6
- use serde:: { de:: DeserializeOwned , Serialize } ;
7
6
8
7
use crate :: {
9
8
bson:: { Bson , Document } ,
@@ -137,10 +136,7 @@ impl Database {
137
136
///
138
137
/// This method does not send or receive anything across the wire to the database, so it can be
139
138
/// used repeatedly without incurring any costs from I/O.
140
- pub fn collection < T > ( & self , name : & str ) -> Collection < T >
141
- where
142
- T : Serialize + DeserializeOwned + Unpin + Debug ,
143
- {
139
+ pub fn collection < T > ( & self , name : & str ) -> Collection < T > {
144
140
Collection :: new ( self . clone ( ) , name, None )
145
141
}
146
142
@@ -154,10 +150,7 @@ impl Database {
154
150
& self ,
155
151
name : & str ,
156
152
options : CollectionOptions ,
157
- ) -> Collection < T >
158
- where
159
- T : Serialize + DeserializeOwned + Unpin + Debug ,
160
- {
153
+ ) -> Collection < T > {
161
154
Collection :: new ( self . clone ( ) , name, Some ( options) )
162
155
}
163
156
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ mod test;
4
4
5
5
use std:: fmt:: Debug ;
6
6
7
- use serde:: { de:: DeserializeOwned , Deserialize , Serialize } ;
7
+ use serde:: { de:: DeserializeOwned , Deserialize } ;
8
8
9
9
use self :: options:: FindAndModifyOptions ;
10
10
use crate :: {
@@ -27,7 +27,7 @@ use crate::{
27
27
28
28
pub ( crate ) struct FindAndModify < T = Document >
29
29
where
30
- T : Serialize + DeserializeOwned + Unpin + Debug ,
30
+ T : DeserializeOwned ,
31
31
{
32
32
ns : Namespace ,
33
33
query : Document ,
37
37
38
38
impl < T > FindAndModify < T >
39
39
where
40
- T : Serialize + DeserializeOwned + Unpin + Debug ,
40
+ T : DeserializeOwned ,
41
41
{
42
42
pub fn with_delete (
43
43
ns : Namespace ,
97
97
98
98
impl < T > Operation for FindAndModify < T >
99
99
where
100
- T : Serialize + DeserializeOwned + Unpin + Debug ,
100
+ T : DeserializeOwned ,
101
101
{
102
102
type O = Option < T > ;
103
103
const NAME : & ' static str = "findAndModify" ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ pub(crate) use update::Update;
60
60
/// A trait modeling the behavior of a server side operation.
61
61
pub ( crate ) trait Operation {
62
62
/// The output type of this operation.
63
- type O : Debug ;
63
+ type O ;
64
64
65
65
/// The name of the server side command associated with this operation.
66
66
const NAME : & ' static str ;
You can’t perform that action at this time.
0 commit comments