@@ -36,7 +36,10 @@ pub fn expand_tabs(line: &str, width: usize, cursor: &mut usize) -> String {
3636fn try_parse_utf8_char(input: &[u8]) -> Option<(char, usize)> {
3737 let str_from_utf8 = |seq| std::str::from_utf8(seq).ok();
3838
39− let decoded = input.get(0..1).and_then(str_from_utf8).map(|c| (c, 1))
39+ let decoded = input
40+ .get(0..1)
41+ .and_then(str_from_utf8)
42+ .map(|c| (c, 1))
4043 .or_else(|| input.get(0..2).and_then(str_from_utf8).map(|c| (c, 2)))
4144 .or_else(|| input.get(0..3).and_then(str_from_utf8).map(|c| (c, 3)))
4245 .or_else(|| input.get(0..4).and_then(str_from_utf8).map(|c| (c, 4)));