@@ -91,7 +91,7 @@ impl Column {
9191/// Backend-specific row abstraction. Only implementors of new
9292/// backends need use this trait directly.
9393pub trait BackendRow {
94- fn get ( & self , idx : usize , ty : SqlType ) -> Result < SqlValRef > ;
94+ fn get ( & self , idx : usize , ty : SqlType ) -> Result < SqlValRef < ' _ > > ;
9595 fn len ( & self ) -> usize ;
9696 // clippy wants this method to exist
9797 fn is_empty ( & self ) -> bool {
@@ -111,7 +111,7 @@ pub trait BackendRows {
111111 fn mapped < F , B > ( self , f : F ) -> MapDeref < Self , F >
112112 where
113113 Self : Sized ,
114- F : FnMut ( & ( dyn BackendRow ) ) -> Result < B > ,
114+ F : FnMut ( & dyn BackendRow ) -> Result < B > ,
115115 {
116116 MapDeref { it : self , f }
117117 }
@@ -126,7 +126,7 @@ pub struct MapDeref<I, F> {
126126impl < I , F , B > fallible_iterator:: FallibleIterator for MapDeref < I , F >
127127where
128128 I : BackendRows ,
129- F : FnMut ( & ( dyn BackendRow ) ) -> Result < B > ,
129+ F : FnMut ( & dyn BackendRow ) -> Result < B > ,
130130{
131131 type Item = B ;
132132 type Error = crate :: Error ;
@@ -171,23 +171,23 @@ impl<T> BackendRows for VecRows<T>
171171where
172172 T : BackendRow ,
173173{
174- fn next ( & mut self ) -> Result < Option < & ( dyn BackendRow ) > > {
174+ fn next ( & mut self ) -> Result < Option < & dyn BackendRow > > {
175175 let ret = self . rows . get ( self . idx ) ;
176176 self . idx += 1 ;
177177 Ok ( ret. map ( |row| row as & dyn BackendRow ) )
178178 }
179179
180- fn current ( & self ) -> Option < & ( dyn BackendRow ) > {
180+ fn current ( & self ) -> Option < & dyn BackendRow > {
181181 self . rows . get ( self . idx ) . map ( |row| row as & dyn BackendRow )
182182 }
183183}
184184
185185impl BackendRows for Box < dyn BackendRows + ' _ > {
186- fn next ( & mut self ) -> Result < Option < & ( dyn BackendRow ) > > {
186+ fn next ( & mut self ) -> Result < Option < & dyn BackendRow > > {
187187 BackendRows :: next ( self . deref_mut ( ) )
188188 }
189189
190- fn current ( & self ) -> Option < & ( dyn BackendRow ) > {
190+ fn current ( & self ) -> Option < & dyn BackendRow > {
191191 self . deref ( ) . current ( )
192192 }
193193}
@@ -200,7 +200,7 @@ pub(crate) struct VecRow {
200200
201201#[ cfg( feature = "async-adapter" ) ]
202202impl VecRow {
203- fn new ( original : & ( dyn BackendRow ) , columns : & [ Column ] ) -> Result < Self > {
203+ fn new ( original : & dyn BackendRow , columns : & [ Column ] ) -> Result < Self > {
204204 if original. len ( ) != columns. len ( ) {
205205 return Err ( crate :: Error :: BoundsError (
206206 "row length doesn't match columns specifier length" . into ( ) ,
@@ -220,7 +220,7 @@ impl VecRow {
220220
221221#[ cfg( feature = "async-adapter" ) ]
222222impl BackendRow for VecRow {
223- fn get ( & self , idx : usize , ty : SqlType ) -> Result < SqlValRef > {
223+ fn get ( & self , idx : usize , ty : SqlType ) -> Result < SqlValRef < ' _ > > {
224224 self . values
225225 . get ( idx)
226226 . ok_or_else ( || crate :: Error :: BoundsError ( "idx out of bounds" . into ( ) ) )
0 commit comments