about summary refs log tree commit diff
path: root/compiler/rustc_span
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-10 22:40:36 +0100
committerGitHub <noreply@github.com>2021-12-10 22:40:36 +0100
commit40988591ecd806fbbfe61db8b5cd05cff33e22d6 (patch)
tree5c5e486f63cb5c203d88fb5274b1639abf7a986f /compiler/rustc_span
parent6cfe9af6a074b842198176d21170e49ee0cc6add (diff)
parent15de4cbc4b49be2fbf082fe02f877d5f774569a5 (diff)
downloadrust-40988591ecd806fbbfe61db8b5cd05cff33e22d6.tar.gz
rust-40988591ecd806fbbfe61db8b5cd05cff33e22d6.zip
Rollup merge of #91625 - est31:remove_indexes, r=oli-obk
Remove redundant [..]s
Diffstat (limited to 'compiler/rustc_span')
-rw-r--r--compiler/rustc_span/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index ea3d3363b80..2934368dfeb 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -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,