@@ -83,29 +83,27 @@ where
8383///
8484/// Consumes the entire stream to ensure proper cleanup before returning which is
8585/// required to fix: https://github.com/weiznich/diesel_async/issues/269
86- pub struct LoadNext < St >
87- where
88- St : TryStream < Error = diesel:: result:: Error > + Unpin ,
89- {
90- future : futures_util:: stream:: TryCollect < St , Vec < St :: Ok > > ,
86+ #[ repr( transparent) ]
87+ pub struct LoadNext < T : TryStreamExt > {
88+ future : futures_util:: stream:: TryCollect < T , Vec < T :: Ok > > ,
9189}
9290
93- impl < St > LoadNext < St >
91+ impl < T > LoadNext < T >
9492where
95- St : TryStream < Error = diesel:: result:: Error > + Unpin ,
93+ T : TryStream < Error = diesel:: result:: Error > + Unpin ,
9694{
97- pub ( crate ) fn new ( stream : St ) -> Self {
95+ pub ( crate ) fn new ( stream : T ) -> Self {
9896 Self {
9997 future : stream. try_collect ( ) ,
10098 }
10199 }
102100}
103101
104- impl < St > Future for LoadNext < St >
102+ impl < T > Future for LoadNext < T >
105103where
106- St : TryStream < Error = diesel:: result:: Error > + Unpin ,
104+ T : TryStream < Error = diesel:: result:: Error > + Unpin ,
107105{
108- type Output = QueryResult < St :: Ok > ;
106+ type Output = QueryResult < T :: Ok > ;
109107
110108 fn poll ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
111109 match Pin :: new ( & mut self . future ) . poll ( cx) {
0 commit comments