From 05edccea2ea1ac45c2aee68ba4e25f02bb0112f3 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 8 Nov 2021 11:28:34 -0600 Subject: [PATCH] style: Make clippy happy --- src/file.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/file.rs b/src/file.rs index 4f081e6..887a9f9 100644 --- a/src/file.rs +++ b/src/file.rs @@ -620,15 +620,14 @@ mod test { fn fix_simple(line: &str, corrections: Vec<(usize, &'static str, &'static str)>) -> String { let line = line.as_bytes().to_vec(); - let corrections: Vec<_> = corrections + let corrections = corrections .into_iter() .map(|(byte_offset, typo, correction)| typos::Typo { byte_offset, typo: typo.into(), corrections: typos::Status::Corrections(vec![correction.into()]), - }) - .collect(); - let actual = fix_buffer(line, corrections.into_iter()); + }); + let actual = fix_buffer(line, corrections); String::from_utf8(actual).unwrap() }