Update needed for Rust v1.73.0

https://rust-lang.github.io/rust-clippy/master/index.html#/format_collect

Bug: 303252546
Test: ./test_compiler.py --prebuilt-path dist/rust-dev.tar.xz  --target aosp_cf_x86_64_phone --image
Change-Id: I17af3567a03c0a49d2bc8fcce531620a1c88ac68
diff --git a/libs/apkverify/tests/apkverify_test.rs b/libs/apkverify/tests/apkverify_test.rs
index 680c81e..0d8e020 100644
--- a/libs/apkverify/tests/apkverify_test.rs
+++ b/libs/apkverify/tests/apkverify_test.rs
@@ -20,6 +20,7 @@
 use apkzip::zip_sections;
 use byteorder::{LittleEndian, ReadBytesExt};
 use log::info;
+use std::fmt::Write;
 use std::io::{Seek, SeekFrom};
 use std::{fs, matches, path::Path};
 
@@ -330,7 +331,10 @@
     assert!(
         fs::metadata(&expected_data_path).is_ok(),
         "File does not exist. You can re-create it with:\n$ echo -en {} > {}\n",
-        bytes_data.iter().map(|b| format!("\\\\x{:02x}", b)).collect::<String>(),
+        bytes_data.iter().fold(String::new(), |mut output, b| {
+            let _ = write!(output, "\\\\x{:02x}", b);
+            output
+        }),
         expected_data_path
     );
     let expected_data = fs::read(&expected_data_path).unwrap();