File tree Expand file tree Collapse file tree 8 files changed +420
-342
lines changed Expand file tree Collapse file tree 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;
33use std:: { fmt:: Debug , sync:: Arc } ;
44
55use futures_util:: stream:: TryStreamExt ;
6- use serde:: { de:: DeserializeOwned , Serialize } ;
76
87use crate :: {
98 bson:: { Bson , Document } ,
@@ -137,10 +136,7 @@ impl Database {
137136 ///
138137 /// This method does not send or receive anything across the wire to the database, so it can be
139138 /// 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 > {
144140 Collection :: new ( self . clone ( ) , name, None )
145141 }
146142
@@ -154,10 +150,7 @@ impl Database {
154150 & self ,
155151 name : & str ,
156152 options : CollectionOptions ,
157- ) -> Collection < T >
158- where
159- T : Serialize + DeserializeOwned + Unpin + Debug ,
160- {
153+ ) -> Collection < T > {
161154 Collection :: new ( self . clone ( ) , name, Some ( options) )
162155 }
163156
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ mod test;
44
55use std:: fmt:: Debug ;
66
7- use serde:: { de:: DeserializeOwned , Deserialize , Serialize } ;
7+ use serde:: { de:: DeserializeOwned , Deserialize } ;
88
99use self :: options:: FindAndModifyOptions ;
1010use crate :: {
@@ -27,7 +27,7 @@ use crate::{
2727
2828pub ( crate ) struct FindAndModify < T = Document >
2929where
30- T : Serialize + DeserializeOwned + Unpin + Debug ,
30+ T : DeserializeOwned ,
3131{
3232 ns : Namespace ,
3333 query : Document ,
3737
3838impl < T > FindAndModify < T >
3939where
40- T : Serialize + DeserializeOwned + Unpin + Debug ,
40+ T : DeserializeOwned ,
4141{
4242 pub fn with_delete (
4343 ns : Namespace ,
9797
9898impl < T > Operation for FindAndModify < T >
9999where
100- T : Serialize + DeserializeOwned + Unpin + Debug ,
100+ T : DeserializeOwned ,
101101{
102102 type O = Option < T > ;
103103 const NAME : & ' static str = "findAndModify" ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ pub(crate) use update::Update;
6060/// A trait modeling the behavior of a server side operation.
6161pub ( crate ) trait Operation {
6262 /// The output type of this operation.
63- type O : Debug ;
63+ type O ;
6464
6565 /// The name of the server side command associated with this operation.
6666 const NAME : & ' static str ;
You can’t perform that action at this time.
0 commit comments