Hint type for .sum()

This commit is contained in:
AnthonyMikh
2019-10-01 03:04:01 +03:00
committed by GitHub
parent 515262cc13
commit fdce4168fc
+1 -1
View File
@@ -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;