From 5f6bc0fb203ee636f4946660b41aea156a598170 Mon Sep 17 00:00:00 2001 From: conorbros Date: Fri, 6 Oct 2023 10:02:44 +1100 Subject: [PATCH] rust 1.73 --- rust-toolchain.toml | 2 +- .../src/transforms/cassandra/sink_cluster/rewrite.rs | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d714e7599..6345921a2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.72" +channel = "1.73" components = [ "rustfmt", "clippy" ] targets = [ "aarch64-unknown-linux-gnu" ] diff --git a/shotover/src/transforms/cassandra/sink_cluster/rewrite.rs b/shotover/src/transforms/cassandra/sink_cluster/rewrite.rs index 72dd00c1e..bb8317d29 100644 --- a/shotover/src/transforms/cassandra/sink_cluster/rewrite.rs +++ b/shotover/src/transforms/cassandra/sink_cluster/rewrite.rs @@ -17,6 +17,7 @@ use cql3_parser::common::{ use cql3_parser::select::{Select, SelectElement}; use futures::future::try_join_all; use itertools::Itertools; +use std::fmt::Write; use std::net::{IpAddr, Ipv4Addr}; use uuid::Uuid; use version_compare::Cmp; @@ -307,10 +308,13 @@ impl MessageRewriter { }) .collect(); if !prepared_results.windows(2).all(|w| w[0] == w[1]) { - let err_str = prepared_results - .iter() - .map(|p| format!("\n{:?}", p)) - .collect::(); + let err_str = + prepared_results + .iter() + .fold(String::new(), |mut output, b| { + let _ = write!(output, "\n{b:?}"); + output + }); tracing::error!( "Nodes did not return the same response to PREPARE statement {err_str}"