1
Fork 0

Remove redundant [..]s

This commit is contained in:
est31 2021-12-03 03:06:36 +01:00
parent e6b883c74f
commit 15de4cbc4b
45 changed files with 123 additions and 127 deletions

View file

@ -1383,7 +1383,7 @@ impl<S: Encoder> Encodable<S> for SourceFile {
// Encode the first element.
lines[0].encode(s)?;
let diff_iter = lines[..].array_windows().map(|&[fst, snd]| snd - fst);
let diff_iter = lines.array_windows().map(|&[fst, snd]| snd - fst);
match bytes_per_diff {
1 => {
@ -1506,7 +1506,7 @@ impl SourceFile {
assert!(end_pos <= u32::MAX as usize);
let (lines, multibyte_chars, non_narrow_chars) =
analyze_source_file::analyze_source_file(&src[..], start_pos);
analyze_source_file::analyze_source_file(&src, start_pos);
SourceFile {
name,