mirror of
https://github.com/crate-ci/typos.git
synced 2026-10-17 17:45:10 +02:00
style: Make clippy happy
This commit is contained in:
+3
-4
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user