fix some clippy::style findings
comparison_to_empty iter_nth_zero for_kv_map manual_next_back redundant_pattern
This commit is contained in:
parent
8771282d4e
commit
ed4c5fef72
6 changed files with 15 additions and 12 deletions
|
@ -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)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue