@@ -72,31 +72,27 @@ impl<'cursor, R: Row> DataTypeValidator<'cursor, R> {
7272 RowKind :: Primitive => {
7373 panic ! (
7474 "While processing row as a primitive: attempting to deserialize \
75- ClickHouse type {} as {} which is not compatible",
76- data_type, serde_type
75+ ClickHouse type {data_type} as {serde_type} which is not compatible"
7776 )
7877 }
7978 RowKind :: Vec => {
8079 panic ! (
8180 "While processing row as a vector: attempting to deserialize \
82- ClickHouse type {} as {} which is not compatible",
83- data_type, serde_type
81+ ClickHouse type {data_type} as {serde_type} which is not compatible"
8482 )
8583 }
8684 RowKind :: Tuple => {
8785 panic ! (
8886 "While processing row as a tuple: attempting to deserialize \
89- ClickHouse type {} as {} which is not compatible",
90- data_type, serde_type
87+ ClickHouse type {data_type} as {serde_type} which is not compatible"
9188 )
9289 }
9390 RowKind :: Struct => {
9491 if is_inner {
9592 let ( full_name, full_data_type) = self . get_current_column_name_and_type ( ) ;
9693 panic ! (
97- "While processing column {} defined as {}: attempting to deserialize \
98- nested ClickHouse type {} as {} which is not compatible",
99- full_name, full_data_type, data_type, serde_type
94+ "While processing column {full_name} defined as {full_data_type}: attempting to deserialize \
95+ nested ClickHouse type {data_type} as {serde_type} which is not compatible"
10096 )
10197 } else {
10298 panic ! (
@@ -143,8 +139,7 @@ impl<'cursor, R: Row> SchemaValidator<R> for DataTypeValidator<'cursor, R> {
143139 _ => {
144140 // should be unreachable
145141 panic ! (
146- "While processing tuple row: expected serde type Tuple(N), got {}" ,
147- serde_type
142+ "While processing tuple row: expected serde type Tuple(N), got {serde_type}"
148143 ) ;
149144 }
150145 }
@@ -302,9 +297,8 @@ impl<'cursor, R: Row> SchemaValidator<R> for Option<InnerDataTypeValidator<'_, '
302297 let ( full_name, full_data_type) =
303298 inner. root . get_current_column_name_and_type ( ) ;
304299 panic ! (
305- "While processing column {} defined as {}: \
306- attempting to deserialize {} while no more elements are allowed",
307- full_name, full_data_type, serde_type
300+ "While processing column {full_name} defined as {full_data_type}: \
301+ attempting to deserialize {serde_type} while no more elements are allowed"
308302 )
309303 }
310304 }
@@ -320,9 +314,8 @@ impl<'cursor, R: Row> SchemaValidator<R> for Option<InnerDataTypeValidator<'_, '
320314 } else {
321315 let ( full_name, full_data_type) = inner. root . get_current_column_name_and_type ( ) ;
322316 panic ! (
323- "While processing root tuple element {} defined as {}: \
324- attempting to deserialize {} while no more elements are allowed",
325- full_name, full_data_type, serde_type
317+ "While processing root tuple element {full_name} defined as {full_data_type}: \
318+ attempting to deserialize {serde_type} while no more elements are allowed"
326319 )
327320 }
328321 }
@@ -564,9 +557,8 @@ fn validate_impl<'de, 'cursor, R: Row>(
564557 } else {
565558 let ( full_name, full_data_type) = root. get_current_column_name_and_type ( ) ;
566559 panic ! (
567- "While processing column {} defined as {}: attempting to deserialize \
568- nested ClickHouse type {} as {}",
569- full_name, full_data_type, data_type, serde_type,
560+ "While processing column {full_name} defined as {full_data_type}: attempting to deserialize \
561+ nested ClickHouse type {data_type} as {serde_type}",
570562 )
571563 }
572564 }
@@ -599,10 +591,7 @@ fn validate_impl<'de, 'cursor, R: Row>(
599591 kind : InnerDataTypeValidatorKind :: Map ( kv, MapValidatorState :: Key ) ,
600592 } )
601593 } else {
602- panic ! (
603- "Expected Map for {} call, but got {}" ,
604- serde_type, data_type
605- )
594+ panic ! ( "Expected Map for {serde_type} call, but got {data_type}" , )
606595 }
607596 }
608597 SerdeType :: Enum => {
@@ -615,10 +604,7 @@ fn validate_impl<'de, 'cursor, R: Row>(
615604 ) ,
616605 } )
617606 } else {
618- panic ! (
619- "Expected Variant for {} call, but got {}" ,
620- serde_type, data_type
621- )
607+ panic ! ( "Expected Variant for {serde_type} call, but got {data_type}" )
622608 }
623609 }
624610
0 commit comments