Skip to content

Commit

Permalink
serialize/row: relax restriction on SerializeRow impl on reference
Browse files Browse the repository at this point in the history
The bound on `impl<T: SerializeRow> SerializeRow for &T` implicitly
requires the type `T` to be sized, preventing it from being used with
`dyn SerializeRow`. Relax the restriction by adding `+ ?Sized` to be
able to use it with trait objects.
  • Loading branch information
piodul committed Dec 8, 2023
1 parent ef6e428 commit 6a1ea41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scylla-cql/src/types/serialize/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl<T: SerializeCql, S: BuildHasher> SerializeRow for HashMap<&str, T, S> {
impl_serialize_row_for_map!();
}

impl<T: SerializeRow> SerializeRow for &T {
impl<T: SerializeRow + ?Sized> SerializeRow for &T {
fn serialize(
&self,
ctx: &RowSerializationContext<'_>,
Expand Down

0 comments on commit 6a1ea41

Please sign in to comment.