about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-19 11:07:13 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-19 12:24:43 -0500
commit49684850bedcef007a2949c97872606d1d6dc325 (patch)
tree3842f94c466f1466a391cfa344cc448998984f1a /src/libsyntax/parse
parent43f2c199e4e87d7ccd15658c52ad8dc5a1d54fb9 (diff)
downloadrust-49684850bedcef007a2949c97872606d1d6dc325.tar.gz
rust-49684850bedcef007a2949c97872606d1d6dc325.zip
remove unnecessary parentheses from range notation
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/comments.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs
index 16ade904be8..79a85e9afbd 100644
--- a/src/libsyntax/parse/lexer/comments.rs
+++ b/src/libsyntax/parse/lexer/comments.rs
@@ -116,7 +116,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> 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 @@ pub fn strip_doc_comment_decoration(comment: &str) -> 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> >();