]> git.lizzy.rs Git - rust.git/commitdiff
address review comment
authorTshepang Lekhonkhobe <tshepang@gmail.com>
Mon, 4 Jan 2016 19:35:06 +0000 (21:35 +0200)
committerTshepang Lekhonkhobe <tshepang@gmail.com>
Mon, 4 Jan 2016 19:35:06 +0000 (21:35 +0200)
src/libsyntax/parse/lexer/comments.rs

index 5365870d3fe88f0d53cae14ace43b88b854538d4..e336c98f03ca0c7d2795f2407776c12cca94c8b1 100644 (file)
@@ -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,
         });