@@ -29,7 +29,7 @@ use crate::cluster::{ClusterState, NodeRef};
29
29
#[ allow( deprecated) ]
30
30
use crate :: cql_to_rust:: { FromRow , FromRowError } ;
31
31
use crate :: deserialize:: DeserializeOwnedRow ;
32
- use crate :: errors:: { QueryError , RequestAttemptError , RequestError } ;
32
+ use crate :: errors:: { RequestAttemptError , RequestError } ;
33
33
use crate :: frame:: response:: result;
34
34
use crate :: network:: Connection ;
35
35
use crate :: observability:: driver_tracing:: RequestSpan ;
@@ -584,11 +584,11 @@ impl QueryPager {
584
584
/// borrows from self.
585
585
///
586
586
/// This is cancel-safe.
587
- async fn next ( & mut self ) -> Option < Result < ColumnIterator , QueryError > > {
587
+ async fn next ( & mut self ) -> Option < Result < ColumnIterator , NextRowError > > {
588
588
let res = std:: future:: poll_fn ( |cx| Pin :: new ( & mut * self ) . poll_fill_page ( cx) ) . await ;
589
589
match res {
590
590
Some ( Ok ( ( ) ) ) => { }
591
- Some ( Err ( err) ) => return Some ( Err ( err. into ( ) ) ) ,
591
+ Some ( Err ( err) ) => return Some ( Err ( err) ) ,
592
592
None => return None ,
593
593
}
594
594
@@ -597,7 +597,7 @@ impl QueryPager {
597
597
self . current_page
598
598
. next ( )
599
599
. unwrap ( )
600
- . map_err ( |err| NextRowError :: RowDeserializationError ( err ) . into ( ) ) ,
600
+ . map_err ( NextRowError :: RowDeserializationError ) ,
601
601
)
602
602
}
603
603
@@ -1035,14 +1035,14 @@ impl<RowT> Stream for TypedRowStream<RowT>
1035
1035
where
1036
1036
RowT : DeserializeOwnedRow ,
1037
1037
{
1038
- type Item = Result < RowT , QueryError > ;
1038
+ type Item = Result < RowT , NextRowError > ;
1039
1039
1040
1040
fn poll_next ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Option < Self :: Item > > {
1041
1041
let next_fut = async {
1042
1042
self . raw_row_lending_stream . next ( ) . await . map ( |res| {
1043
1043
res. and_then ( |column_iterator| {
1044
1044
<RowT as DeserializeRow >:: deserialize ( column_iterator)
1045
- . map_err ( |err| NextRowError :: RowDeserializationError ( err ) . into ( ) )
1045
+ . map_err ( NextRowError :: RowDeserializationError )
1046
1046
} )
1047
1047
} )
1048
1048
} ;
@@ -1177,7 +1177,7 @@ mod legacy {
1177
1177
pub enum LegacyNextRowError {
1178
1178
/// Query to fetch next page has failed
1179
1179
#[ error( transparent) ]
1180
- QueryError ( #[ from] QueryError ) ,
1180
+ NextRowError ( #[ from] NextRowError ) ,
1181
1181
1182
1182
/// Parsing values in row as given types failed
1183
1183
#[ error( transparent) ]
0 commit comments