]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/parse/lexer/comments.rs
rollup merge of #21438: taralx/kill-racycell
[rust.git] / src / libsyntax / parse / lexer / comments.rs
index 2799696e8eb2f4eca364c4336511c46b455d0524..c58136b30aa1aeec67bcc26bf77e008369f8849f 100644 (file)
@@ -116,7 +116,7 @@ fn horizontal_trim(lines: Vec<String> ) -> Vec<String> {
 
         if can_trim {
             lines.iter().map(|line| {
-                (&line[(i + 1)..line.len()]).to_string()
+                (&line[i + 1..line.len()]).to_string()
             }).collect()
         } else {
             lines
@@ -132,7 +132,7 @@ fn horizontal_trim(lines: Vec<String> ) -> Vec<String> {
     }
 
     if comment.starts_with("/*") {
-        let lines = comment[3us..(comment.len() - 2us)]
+        let lines = comment[3..comment.len() - 2]
             .lines_any()
             .map(|s| s.to_string())
             .collect::<Vec<String> >();