diff --git a/src/expr/src/scalar/func.rs b/src/expr/src/scalar/func.rs index 45b5ddbba9f38..7431ddf13a604 100644 --- a/src/expr/src/scalar/func.rs +++ b/src/expr/src/scalar/func.rs @@ -4896,7 +4896,7 @@ where Uuid => Ok(strconv::format_uuid(buf, d.unwrap_uuid())), Record { fields, .. } => { let mut fields = fields.iter(); - strconv::format_record(buf, &d.unwrap_list(), |buf, d| { + strconv::format_record(buf, d.unwrap_list(), |buf, d| { let (_name, ty) = fields.next().unwrap(); if d.is_null() { Ok(buf.write_null()) @@ -4908,7 +4908,7 @@ where Array(elem_type) => strconv::format_array( buf, &d.unwrap_array().dims().into_iter().collect::>(), - &d.unwrap_array().elements(), + d.unwrap_array().elements(), |buf, d| { if d.is_null() { Ok(buf.write_null()) @@ -4917,7 +4917,7 @@ where } }, ), - List { element_type, .. } => strconv::format_list(buf, &d.unwrap_list(), |buf, d| { + List { element_type, .. } => strconv::format_list(buf, d.unwrap_list(), |buf, d| { if d.is_null() { Ok(buf.write_null()) } else { @@ -4931,7 +4931,7 @@ where stringify_datum(buf.nonnull_buffer(), d, value_type) } }), - Int2Vector => strconv::format_legacy_vector(buf, &d.unwrap_array().elements(), |buf, d| { + Int2Vector => strconv::format_legacy_vector(buf, d.unwrap_array().elements(), |buf, d| { stringify_datum(buf.nonnull_buffer(), d, &SqlScalarType::Int16) }), MzTimestamp { .. } => Ok(strconv::format_mz_timestamp(buf, d.unwrap_mz_timestamp())), diff --git a/src/interchange/src/avro/encode.rs b/src/interchange/src/avro/encode.rs index 2f18bf1a4d4c6..a9035625befc1 100644 --- a/src/interchange/src/avro/encode.rs +++ b/src/interchange/src/avro/encode.rs @@ -413,7 +413,7 @@ impl<'a> mz_avro::types::ToAvro for TypedDatum<'a> { let list = datum.unwrap_list(); let fields = fields .iter() - .zip_eq(&list) + .zip_eq(list) .map(|((name, typ), datum)| { let name = name.to_string(); let datum = TypedDatum::new(datum, typ); diff --git a/src/interchange/src/json.rs b/src/interchange/src/json.rs index c5d6c32dda700..34a9c1affd438 100644 --- a/src/interchange/src/json.rs +++ b/src/interchange/src/json.rs @@ -196,7 +196,7 @@ impl ToJson for TypedDatum<'_> { let list = datum.unwrap_list(); let fields: Map = fields .iter() - .zip_eq(&list) + .zip_eq(list) .map(|((name, typ), datum)| { let name = name.to_string(); let datum = TypedDatum::new(datum, typ); diff --git a/src/repr/src/row.rs b/src/repr/src/row.rs index 50fbc9fceac7a..f49792fe7dda0 100644 --- a/src/repr/src/row.rs +++ b/src/repr/src/row.rs @@ -2643,7 +2643,7 @@ impl<'a> DatumList<'a> { } } -impl<'a> IntoIterator for &'_ DatumList<'a> { +impl<'a> IntoIterator for DatumList<'a> { type Item = Datum<'a>; type IntoIter = DatumListIter<'a>; fn into_iter(self) -> DatumListIter<'a> { diff --git a/src/repr/src/row/encode.rs b/src/repr/src/row/encode.rs index 63b2cc6606d5b..f9f5aea1a7aa4 100644 --- a/src/repr/src/row/encode.rs +++ b/src/repr/src/row/encode.rs @@ -439,7 +439,7 @@ impl DatumColumnEncoder { // Store the values of the array. let mut count = 0; - for datum in &array.elements() { + for datum in array.elements() { count += 1; vals.push(datum); } @@ -458,7 +458,7 @@ impl DatumColumnEncoder { Datum::List(list), ) => { let mut count = 0; - for datum in &list { + for datum in list { count += 1; values.push(datum); } diff --git a/src/repr/src/scalar.rs b/src/repr/src/scalar.rs index 8e8bf7e47e581..561de5e69704b 100644 --- a/src/repr/src/scalar.rs +++ b/src/repr/src/scalar.rs @@ -1556,12 +1556,12 @@ impl fmt::Display for Datum<'_> { f.write_str("=")?; } f.write_str("{")?; - write_delimited(f, ", ", &array.elements, |f, e| write!(f, "{}", e))?; + write_delimited(f, ", ", array.elements, |f, e| write!(f, "{}", e))?; f.write_str("}") } Datum::List(list) => { f.write_str("[")?; - write_delimited(f, ", ", list, |f, e| write!(f, "{}", e))?; + write_delimited(f, ", ", *list, |f, e| write!(f, "{}", e))?; f.write_str("]") } Datum::Map(dict) => { diff --git a/src/storage/src/decode.rs b/src/storage/src/decode.rs index 72480a35a74d9..f286d5348530b 100644 --- a/src/storage/src/decode.rs +++ b/src/storage/src/decode.rs @@ -89,7 +89,7 @@ pub fn render_decode_cdcv2, FromTime: T let time = update.next().unwrap().unwrap_int64(); let diff = Diff::from(update.next().unwrap().unwrap_int64()); - row_buf.packer().extend(&data); + row_buf.packer().extend(data); let data = row_buf.clone(); let time = u64::try_from(time).expect("non-negative"); let time = mz_repr::Timestamp::from(time); @@ -100,17 +100,17 @@ pub fn render_decode_cdcv2, FromTime: T (Datum::Null, Datum::List(progress)) => { let mut progress = progress.iter(); let mut lower = vec![]; - for time in &progress.next().unwrap().unwrap_list() { + for time in progress.next().unwrap().unwrap_list() { let time = u64::try_from(time.unwrap_int64()).expect("non-negative"); lower.push(mz_repr::Timestamp::from(time)); } let mut upper = vec![]; - for time in &progress.next().unwrap().unwrap_list() { + for time in progress.next().unwrap().unwrap_list() { let time = u64::try_from(time.unwrap_int64()).expect("non-negative"); upper.push(mz_repr::Timestamp::from(time)); } let mut counts = vec![]; - for pair in &progress.next().unwrap().unwrap_list() { + for pair in progress.next().unwrap().unwrap_list() { let mut pair = pair.unwrap_list().iter(); let time = pair.next().unwrap().unwrap_int64(); let count = pair.next().unwrap().unwrap_int64();