about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2016-01-04 21:35:06 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2016-01-04 21:35:06 +0200
commit249b5c0b4ae2451e7e2987704879e94f8f4e9cfc (patch)
tree03ea43b79d1af628e495a71295858adc17a74554 /src/libsyntax/parse
parent4a1062873eedaa5d804e3050cd94b9c32219f811 (diff)
downloadrust-249b5c0b4ae2451e7e2987704879e94f8f4e9cfc.tar.gz
rust-249b5c0b4ae2451e7e2987704879e94f8f4e9cfc.zip
address review comment
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/comments.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs
index 5365870d3fe..e336c98f03c 100644
--- a/src/libsyntax/parse/lexer/comments.rs
+++ b/src/libsyntax/parse/lexer/comments.rs
@@ -169,11 +169,7 @@ fn read_shebang_comment(rdr: &mut StringReader,
     let p = rdr.last_pos;
     debug!("<<< shebang comment");
     comments.push(Comment {
-        style: if code_to_the_left {
-            Trailing
-        } else {
-            Isolated
-        },
+        style: if code_to_the_left { Trailing } else { Isolated },
         lines: vec![rdr.read_one_line_comment()],
         pos: p,
     });
@@ -198,11 +194,7 @@ fn read_line_comments(rdr: &mut StringReader,
     debug!("<<< line comments");
     if !lines.is_empty() {
         comments.push(Comment {
-            style: if code_to_the_left {
-                Trailing
-            } else {
-                Isolated
-            },
+            style: if code_to_the_left { Trailing } else { Isolated },
             lines: lines,
             pos: p,
         });