diff --git a/examples/compare-tokens.rs b/examples/compare-tokens.rs index 3e46d20b44..bfa9618548 100644 --- a/examples/compare-tokens.rs +++ b/examples/compare-tokens.rs @@ -45,7 +45,7 @@ async fn main() -> Result<()> { .await? .rows .unwrap() - .get(0) + .first() .expect("token query no rows!") .columns[0] .as_ref() diff --git a/scylla-cql/src/frame/value.rs b/scylla-cql/src/frame/value.rs index c29e73b75f..3c17c8629f 100644 --- a/scylla-cql/src/frame/value.rs +++ b/scylla-cql/src/frame/value.rs @@ -941,7 +941,7 @@ fn serialize_empty(buf: &mut Vec) -> Result<(), ValueTooBig> { impl Value for CqlValue { fn serialize(&self, buf: &mut Vec) -> Result<(), ValueTooBig> { match self { - CqlValue::Map(m) => serialize_map(m.iter().map(|(k, v)| (k, v)), m.len(), buf), + CqlValue::Map(m) => serialize_map(m.iter().map(|p| (&p.0, &p.1)), m.len(), buf), CqlValue::Tuple(t) => serialize_tuple(t.iter(), buf), // A UDT value is composed of successive [bytes] values, one for each field of the UDT diff --git a/scylla-cql/src/types/serialize/value.rs b/scylla-cql/src/types/serialize/value.rs index d337022623..b467c41e27 100644 --- a/scylla-cql/src/types/serialize/value.rs +++ b/scylla-cql/src/types/serialize/value.rs @@ -488,7 +488,7 @@ fn serialize_cql_value<'b>( CqlValue::Map(m) => serialize_mapping( std::any::type_name::(), m.len(), - m.iter().map(|(ref k, ref v)| (k, v)), + m.iter().map(|p| (&p.0, &p.1)), typ, writer, ),