File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
scylla-cql/src/types/serialize Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1574,17 +1574,21 @@ mod tests {
15741574 assert_eq ! ( typed_data, erased_data) ;
15751575 }
15761576
1577- fn do_serialize < T : SerializeCql > ( t : T , typ : & ColumnType ) -> Vec < u8 > {
1577+ fn do_serialize_result < T : SerializeCql > (
1578+ t : T ,
1579+ typ : & ColumnType ,
1580+ ) -> Result < Vec < u8 > , SerializationError > {
15781581 let mut ret = Vec :: new ( ) ;
15791582 let writer = CellWriter :: new ( & mut ret) ;
1580- t. serialize ( typ, writer) . unwrap ( ) ;
1581- ret
1583+ t. serialize ( typ, writer) . map ( |_| ( ) ) . map ( |( ) | ret)
1584+ }
1585+
1586+ fn do_serialize < T : SerializeCql > ( t : T , typ : & ColumnType ) -> Vec < u8 > {
1587+ do_serialize_result ( t, typ) . unwrap ( )
15821588 }
15831589
15841590 fn do_serialize_err < T : SerializeCql > ( t : T , typ : & ColumnType ) -> SerializationError {
1585- let mut ret = Vec :: new ( ) ;
1586- let writer = CellWriter :: new ( & mut ret) ;
1587- t. serialize ( typ, writer) . unwrap_err ( )
1591+ do_serialize_result ( t, typ) . unwrap_err ( )
15881592 }
15891593
15901594 #[ test]
You can’t perform that action at this time.
0 commit comments