From 8b25e5a02e43e2a515854102a58bf6d229291938 Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 25 Oct 2023 17:26:27 +0200 Subject: [PATCH] Fix lint --- src/advisories/cfg.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/advisories/cfg.rs b/src/advisories/cfg.rs index 3f6e517b..959fa906 100644 --- a/src/advisories/cfg.rs +++ b/src/advisories/cfg.rs @@ -412,10 +412,11 @@ mod test { "PT1,5S", ]; - let failures: String = FAILURES - .iter() - .map(|bad| format!("{:?}\n", dur_parse(bad))) - .collect(); + let failures: String = FAILURES.iter().fold(String::new(), |mut acc, bad| { + use std::fmt::Write; + writeln!(&mut acc, "{:?}", dur_parse(bad)).unwrap(); + acc + }); insta::assert_snapshot!(failures); }