@@ -108,8 +108,8 @@ macro_rules! impl_serialize_row_for_unit {
108
108
if !ctx. columns( ) . is_empty( ) {
109
109
return Err ( mk_typck_err:: <Self >(
110
110
BuiltinTypeCheckErrorKind :: WrongColumnCount {
111
- actual : 0 ,
112
- asked_for : ctx. columns( ) . len( ) ,
111
+ rust_cols : 0 ,
112
+ cql_cols : ctx. columns( ) . len( ) ,
113
113
} ,
114
114
) ) ;
115
115
}
@@ -142,8 +142,8 @@ macro_rules! impl_serialize_row_for_slice {
142
142
if ctx. columns( ) . len( ) != self . len( ) {
143
143
return Err ( mk_typck_err:: <Self >(
144
144
BuiltinTypeCheckErrorKind :: WrongColumnCount {
145
- actual : self . len( ) ,
146
- asked_for : ctx. columns( ) . len( ) ,
145
+ rust_cols : self . len( ) ,
146
+ cql_cols : ctx. columns( ) . len( ) ,
147
147
} ,
148
148
) ) ;
149
149
}
@@ -289,8 +289,8 @@ macro_rules! impl_tuple {
289
289
[ $( $tidents) ,* ] => ( $( $tidents, ) * ) ,
290
290
_ => return Err ( mk_typck_err:: <Self >(
291
291
BuiltinTypeCheckErrorKind :: WrongColumnCount {
292
- actual : $length,
293
- asked_for : ctx. columns( ) . len( ) ,
292
+ rust_cols : $length,
293
+ cql_cols : ctx. columns( ) . len( ) ,
294
294
} ,
295
295
) ) ,
296
296
} ;
@@ -582,13 +582,13 @@ fn mk_ser_err_named(
582
582
#[ derive( Debug , Clone ) ]
583
583
#[ non_exhaustive]
584
584
pub enum BuiltinTypeCheckErrorKind {
585
- /// The Rust type expects `actual` column , but the statement requires `asked_for `.
585
+ /// The Rust type provides `rust_cols` columns , but the statement operates on `cql_cols `.
586
586
WrongColumnCount {
587
587
/// The number of values that the Rust type provides.
588
- actual : usize ,
588
+ rust_cols : usize ,
589
589
590
- /// The number of columns that the statement requires .
591
- asked_for : usize ,
590
+ /// The number of columns that the statement operates on .
591
+ cql_cols : usize ,
592
592
} ,
593
593
594
594
/// The Rust type provides a value for some column, but that column is not
@@ -618,8 +618,8 @@ pub enum BuiltinTypeCheckErrorKind {
618
618
impl Display for BuiltinTypeCheckErrorKind {
619
619
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
620
620
match self {
621
- BuiltinTypeCheckErrorKind :: WrongColumnCount { actual , asked_for } => {
622
- write ! ( f, "wrong column count: the query requires {asked_for } columns, but {actual} were provided " )
621
+ BuiltinTypeCheckErrorKind :: WrongColumnCount { rust_cols , cql_cols } => {
622
+ write ! ( f, "wrong column count: the statement operates on {cql_cols } columns, but the given rust type provides {rust_cols} " )
623
623
}
624
624
BuiltinTypeCheckErrorKind :: NoColumnWithName { name } => {
625
625
write ! (
@@ -1048,8 +1048,8 @@ mod tests {
1048
1048
assert_matches ! (
1049
1049
err. kind,
1050
1050
BuiltinTypeCheckErrorKind :: WrongColumnCount {
1051
- actual : 0 ,
1052
- asked_for : 1 ,
1051
+ rust_cols : 0 ,
1052
+ cql_cols : 1 ,
1053
1053
}
1054
1054
) ;
1055
1055
@@ -1063,8 +1063,8 @@ mod tests {
1063
1063
assert_matches ! (
1064
1064
err. kind,
1065
1065
BuiltinTypeCheckErrorKind :: WrongColumnCount {
1066
- actual : 1 ,
1067
- asked_for : 2 ,
1066
+ rust_cols : 1 ,
1067
+ cql_cols : 2 ,
1068
1068
}
1069
1069
) ;
1070
1070
@@ -1090,8 +1090,8 @@ mod tests {
1090
1090
assert_matches ! (
1091
1091
err. kind,
1092
1092
BuiltinTypeCheckErrorKind :: WrongColumnCount {
1093
- actual : 1 ,
1094
- asked_for : 2 ,
1093
+ rust_cols : 1 ,
1094
+ cql_cols : 2 ,
1095
1095
}
1096
1096
) ;
1097
1097
0 commit comments