@@ -48,7 +48,7 @@ pub trait SerializeCql {
48
48
/// The [`CellWriter`] provided to the method ensures that the value produced
49
49
/// will be properly framed (i.e. incorrectly written value should not
50
50
/// cause the rest of the request to be misinterpreted), but otherwise
51
- /// the implementor of the trait is responsible for producing the a value
51
+ /// the implementor of the trait is responsible for producing the value
52
52
/// in a correct format.
53
53
fn serialize < ' b > (
54
54
& self ,
@@ -548,8 +548,8 @@ fn serialize_cql_value<'b>(
548
548
return Err ( mk_typck_err :: < CqlValue > (
549
549
typ,
550
550
TupleTypeCheckErrorKind :: WrongElementCount {
551
- actual : t. len ( ) ,
552
- asked_for : fields. len ( ) ,
551
+ rust_type_el_count : t. len ( ) ,
552
+ cql_type_el_count : fields. len ( ) ,
553
553
} ,
554
554
) ) ;
555
555
}
@@ -586,7 +586,7 @@ fn fix_cql_value_name_in_err(mut err: SerializationError) -> SerializationError
586
586
}
587
587
}
588
588
None => {
589
- // The `None` case shouldn't happen consisdering how we are using
589
+ // The `None` case shouldn't happen considering how we are using
590
590
// the function in the code now, but let's provide it here anyway
591
591
// for correctness.
592
592
if let Some ( err) = err. 0 . downcast_ref :: < BuiltinTypeCheckError > ( ) {
@@ -729,8 +729,8 @@ macro_rules! impl_tuple {
729
729
_ => return Err ( mk_typck_err:: <Self >(
730
730
typ,
731
731
TupleTypeCheckErrorKind :: WrongElementCount {
732
- actual : $length,
733
- asked_for : typs. len( ) ,
732
+ rust_type_el_count : $length,
733
+ cql_type_el_count : typs. len( ) ,
734
734
}
735
735
) )
736
736
}
@@ -1352,10 +1352,10 @@ pub enum TupleTypeCheckErrorKind {
1352
1352
/// elements will be set to null.
1353
1353
WrongElementCount {
1354
1354
/// The number of elements that the Rust tuple has.
1355
- actual : usize ,
1355
+ rust_type_el_count : usize ,
1356
1356
1357
1357
/// The number of elements that the CQL tuple type has.
1358
- asked_for : usize ,
1358
+ cql_type_el_count : usize ,
1359
1359
} ,
1360
1360
}
1361
1361
@@ -1366,9 +1366,12 @@ impl Display for TupleTypeCheckErrorKind {
1366
1366
f,
1367
1367
"the CQL type the tuple was attempted to be serialized to is not a tuple"
1368
1368
) ,
1369
- TupleTypeCheckErrorKind :: WrongElementCount { actual, asked_for } => write ! (
1369
+ TupleTypeCheckErrorKind :: WrongElementCount {
1370
+ rust_type_el_count,
1371
+ cql_type_el_count,
1372
+ } => write ! (
1370
1373
f,
1371
- "wrong tuple element count: CQL type has {asked_for }, the Rust tuple has {actual }"
1374
+ "wrong tuple element count: CQL type has {cql_type_el_count }, the Rust tuple has {rust_type_el_count }"
1372
1375
) ,
1373
1376
}
1374
1377
}
@@ -1807,8 +1810,8 @@ mod tests {
1807
1810
assert_matches ! (
1808
1811
err. kind,
1809
1812
BuiltinTypeCheckErrorKind :: TupleError ( TupleTypeCheckErrorKind :: WrongElementCount {
1810
- actual : 3 ,
1811
- asked_for : 2 ,
1813
+ rust_type_el_count : 3 ,
1814
+ cql_type_el_count : 2 ,
1812
1815
} )
1813
1816
) ;
1814
1817
@@ -1879,8 +1882,8 @@ mod tests {
1879
1882
assert_matches ! (
1880
1883
err. kind,
1881
1884
BuiltinTypeCheckErrorKind :: TupleError ( TupleTypeCheckErrorKind :: WrongElementCount {
1882
- actual : 3 ,
1883
- asked_for : 2 ,
1885
+ rust_type_el_count : 3 ,
1886
+ cql_type_el_count : 2 ,
1884
1887
} )
1885
1888
) ;
1886
1889
0 commit comments