1
Fork 0

fix some clippy::style findings

comparison_to_empty
iter_nth_zero
for_kv_map
manual_next_back
redundant_pattern
This commit is contained in:
Matthias Krüger 2023-07-23 12:08:42 +02:00
parent 8771282d4e
commit ed4c5fef72
6 changed files with 15 additions and 12 deletions

View file

@ -27,7 +27,7 @@ pub(crate) fn emit_unescape_error(
lit, span_with_quotes, mode, range, error
);
let last_char = || {
let c = lit[range.clone()].chars().rev().next().unwrap();
let c = lit[range.clone()].chars().next_back().unwrap();
let span = span.with_lo(span.hi() - BytePos(c.len_utf8() as u32));
(c, span)
};