Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/expr/src/scalar/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -4908,7 +4908,7 @@ where
Array(elem_type) => strconv::format_array(
buf,
&d.unwrap_array().dims().into_iter().collect::<Vec<_>>(),
&d.unwrap_array().elements(),
d.unwrap_array().elements(),
|buf, d| {
if d.is_null() {
Ok(buf.write_null())
Expand All @@ -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 {
Expand All @@ -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())),
Expand Down
2 changes: 1 addition & 1 deletion src/interchange/src/avro/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/interchange/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl ToJson for TypedDatum<'_> {
let list = datum.unwrap_list();
let fields: Map<String, serde_json::Value> = fields
.iter()
.zip_eq(&list)
.zip_eq(list)
.map(|((name, typ), datum)| {
let name = name.to_string();
let datum = TypedDatum::new(datum, typ);
Expand Down
2 changes: 1 addition & 1 deletion src/repr/src/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
4 changes: 2 additions & 2 deletions src/repr/src/row/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/repr/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
8 changes: 4 additions & 4 deletions src/storage/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub fn render_decode_cdcv2<G: Scope<Timestamp = mz_repr::Timestamp>, 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);
Expand All @@ -100,17 +100,17 @@ pub fn render_decode_cdcv2<G: Scope<Timestamp = mz_repr::Timestamp>, 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();
Expand Down