about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-09-26 14:00:19 +1200
committerNick Cameron <ncameron@mozilla.com>2015-09-26 14:00:19 +1200
commitd161b8df72877eae5f99f84bfe20b9efdda2cf73 (patch)
tree8ff7c87b3d9090ffd8cc59b49ebff96630880f1a /src
parent8dfcb9bcdd2cca0b850aff152b54cbaa232070cf (diff)
rebasing changes and address review comment
Diffstat (limited to 'src')
-rw-r--r--src/expr.rs10
-rw-r--r--src/lists.rs2
2 files changed, 9 insertions, 3 deletions
diff --git a/src/expr.rs b/src/expr.rs
index 4d64efda4df..79e03e644e4 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -162,7 +162,10 @@ impl Rewrite for ast::Expr {
                                                                        offset))
             }
             ast::Expr_::ExprRet(None) => {
-                wrap_str("return".to_owned(), context.config.max_width, width, offset)
+                wrap_str("return".to_owned(),
+                         context.config.max_width,
+                         width,
+                         offset)
             }
             ast::Expr_::ExprRet(Some(ref expr)) => {
                 rewrite_unary_prefix(context, "return ", &expr, width, offset)
@@ -652,7 +655,10 @@ fn single_line_if_else(context: &RewriteContext,
         let fits_line = fixed_cost + pat_expr_str.len() + if_str.len() + else_str.len() <= width;
 
         if fits_line && !if_str.contains('\n') && !else_str.contains('\n') {
-            return Some(format!("if {} {{ {} }} else {{ {} }}", pat_expr_str, if_str, else_str));
+            return Some(format!("if {} {{ {} }} else {{ {} }}",
+                                pat_expr_str,
+                                if_str,
+                                else_str));
         }
     }
 
diff --git a/src/lists.rs b/src/lists.rs
index cf1d433a25c..ef3372bf0b6 100644
--- a/src/lists.rs
+++ b/src/lists.rs
@@ -26,7 +26,7 @@ pub enum ListTactic {
     Horizontal,
     // Try Horizontal layout, if that fails then vertical
     HorizontalVertical,
-    // HorizontalVertical with a soft limit.
+    // HorizontalVertical with a soft limit of n characters.
     LimitedHorizontalVertical(usize),
     // Pack as many items as possible per row over (possibly) many rows.
     Mixed,