@@ -29,7 +29,7 @@ use crate::cluster::{ClusterState, NodeRef};
2929#[ allow( deprecated) ]
3030use crate :: cql_to_rust:: { FromRow , FromRowError } ;
3131use crate :: deserialize:: DeserializeOwnedRow ;
32- use crate :: errors:: { QueryError , RequestAttemptError , RequestError } ;
32+ use crate :: errors:: { RequestAttemptError , RequestError } ;
3333use crate :: frame:: response:: result;
3434use crate :: network:: Connection ;
3535use crate :: observability:: driver_tracing:: RequestSpan ;
@@ -584,11 +584,11 @@ impl QueryPager {
584584 /// borrows from self.
585585 ///
586586 /// This is cancel-safe.
587- async fn next ( & mut self ) -> Option < Result < ColumnIterator , QueryError > > {
587+ async fn next ( & mut self ) -> Option < Result < ColumnIterator , NextRowError > > {
588588 let res = std:: future:: poll_fn ( |cx| Pin :: new ( & mut * self ) . poll_fill_page ( cx) ) . await ;
589589 match res {
590590 Some ( Ok ( ( ) ) ) => { }
591- Some ( Err ( err) ) => return Some ( Err ( err. into ( ) ) ) ,
591+ Some ( Err ( err) ) => return Some ( Err ( err) ) ,
592592 None => return None ,
593593 }
594594
@@ -597,7 +597,7 @@ impl QueryPager {
597597 self . current_page
598598 . next ( )
599599 . unwrap ( )
600- . map_err ( |err| NextRowError :: RowDeserializationError ( err ) . into ( ) ) ,
600+ . map_err ( NextRowError :: RowDeserializationError ) ,
601601 )
602602 }
603603
@@ -1035,14 +1035,14 @@ impl<RowT> Stream for TypedRowStream<RowT>
10351035where
10361036 RowT : DeserializeOwnedRow ,
10371037{
1038- type Item = Result < RowT , QueryError > ;
1038+ type Item = Result < RowT , NextRowError > ;
10391039
10401040 fn poll_next ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Option < Self :: Item > > {
10411041 let next_fut = async {
10421042 self . raw_row_lending_stream . next ( ) . await . map ( |res| {
10431043 res. and_then ( |column_iterator| {
10441044 <RowT as DeserializeRow >:: deserialize ( column_iterator)
1045- . map_err ( |err| NextRowError :: RowDeserializationError ( err ) . into ( ) )
1045+ . map_err ( NextRowError :: RowDeserializationError )
10461046 } )
10471047 } )
10481048 } ;
@@ -1177,7 +1177,7 @@ mod legacy {
11771177 pub enum LegacyNextRowError {
11781178 /// Query to fetch next page has failed
11791179 #[ error( transparent) ]
1180- QueryError ( #[ from] QueryError ) ,
1180+ NextRowError ( #[ from] NextRowError ) ,
11811181
11821182 /// Parsing values in row as given types failed
11831183 #[ error( transparent) ]
0 commit comments