From a7d7d5928592800f9af5dcfe17efca90f6a3d2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com> Date: Sun, 19 Feb 2023 18:11:59 +0000 Subject: [PATCH] fix: made clippy pass for old rust versions Using write! instead of list_str.push_str --- build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 6eb60c6c..feac0224 100644 --- a/build.rs +++ b/build.rs @@ -25,6 +25,7 @@ /// ``` use chrono::Utc; use regex::Regex; +use std::fmt::Write as _; use std::fs::{File, OpenOptions}; use std::io::Write; use std::path::Path; @@ -140,7 +141,7 @@ where { let mut list_str = String::new(); for value in &vec { - list_str.push_str(&format!("\"{}\", ", value)) + write!(&mut list_str, "\"{}\", ", value).unwrap(); } list_str.pop(); writeln!( -- GitLab