style: Update clippy

This commit is contained in:
Ed Page committed 2022-03-29 15:07:19 -05:00
1 parent bf2c277951
commit 86c54fffbf
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -131,7 +131,7 @@ impl Report for PrintLong {
fn print_brief_correction(msg: &Typo, palette: Palette) -> Result<(), std::io::Error> {
let line = String::from_utf8_lossy(msg.buffer.as_ref());
let line = line.replace("\t", " ");
let line = line.replace('\t', " ");
let column = unicode_segmentation::UnicodeSegmentation::graphemes(
line.get(0..msg.byte_offset).unwrap(),
true,
@@ -177,7 +177,7 @@ fn print_long_correction(msg: &Typo, palette: Palette) -> Result<(), std::io::Er
let mut handle = stdout.lock();
let line = String::from_utf8_lossy(msg.buffer.as_ref());
let line = line.replace("\t", " ");
let line = line.replace('\t', " ");
let start = String::from_utf8_lossy(&msg.buffer[0..msg.byte_offset]);
let column = unicode_segmentation::UnicodeSegmentation::graphemes(start.as_ref(), true).count();
match &msg.corrections {