mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Hint type for .sum()
This commit is contained in:
@@ -1526,7 +1526,7 @@ fn emit_suggestion_default(
|
||||
// length of the code after substitution
|
||||
let full_sub_len = part.snippet.chars()
|
||||
.map(|ch| unicode_width::UnicodeWidthChar::width(ch).unwrap_or(1))
|
||||
.sum() as isize;
|
||||
.sum::<usize>() as isize;
|
||||
|
||||
// length of the code to be substituted
|
||||
let snippet_len = span_end_pos as isize - span_start_pos as isize;
|
||||
|
||||
Reference in New Issue
Block a user