]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/parse/lexer/comments.rs
remove unnecessary parentheses from range notation
[rust.git] / src / libsyntax / parse / lexer / comments.rs
index 16ade904be8834ee707a80fea10821f2be8a8e62..79a85e9afbd1f8952486ea383b95805f7c0619b8 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[3u..(comment.len() - 2u)]
+        let lines = comment[3u..comment.len() - 2u]
             .lines_any()
             .map(|s| s.to_string())
             .collect::<Vec<String> >();