about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2017-06-02 11:44:38 +1200
committerNick Cameron <ncameron@mozilla.com>2017-06-02 11:44:38 +1200
commitcdc3f9321cbb88bc336eb7a2ef76e7f8c5dabf06 (patch)
tree349d87e1320770c9ef8837e248fd172d87cd37e5 /src
parent0480f7e105adf9568c632e1579882e3e40077307 (diff)
Rename the Style::Default option to Legacy
Diffstat (limited to 'src')
-rw-r--r--src/config.rs6
-rw-r--r--src/expr.rs6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/config.rs b/src/config.rs
index c4f078c5536..1d912093c2e 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -33,7 +33,7 @@ macro_rules! configuration_option_enum{
 
 configuration_option_enum! { Style:
     Rfc, // Follow the style RFCs style.
-    Default, // Follow the traditional Rustfmt style.
+    Legacy, // Follow the traditional Rustfmt style.
 }
 
 configuration_option_enum! { NewlineStyle:
@@ -498,7 +498,7 @@ create_config! {
     newline_style: NewlineStyle, NewlineStyle::Unix, "Unix or Windows line endings";
     fn_brace_style: BraceStyle, BraceStyle::SameLineWhere, "Brace style for functions";
     item_brace_style: BraceStyle, BraceStyle::SameLineWhere, "Brace style for structs and enums";
-    control_style: Style, Style::Default, "Indent style for control flow statements";
+    control_style: Style, Style::Legacy, "Indent style for control flow statements";
     control_brace_style: ControlBraceStyle, ControlBraceStyle::AlwaysSameLine,
         "Brace style for control flow constructs";
     impl_empty_single_line: bool, true, "Put empty-body implementations on a single line";
@@ -517,7 +517,7 @@ create_config! {
         "Maximum width of an array literal before falling back to vertical formatting";
     type_punctuation_density: TypeDensity, TypeDensity::Wide,
         "Determines if '+' or '=' are wrapped in spaces in the punctuation of types";
-    where_style: Style, Style::Default, "Overall strategy for where clauses";
+    where_style: Style, Style::Legacy, "Overall strategy for where clauses";
     // TODO:
     // 1. Should we at least try to put the where clause on the same line as the rest of the
     // function decl?
diff --git a/src/expr.rs b/src/expr.rs
index ed896231ba9..c9b9284bb30 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -327,7 +327,7 @@ pub fn rewrite_pair<LHS, RHS>(lhs: &LHS,
     // Re-evaluate the rhs because we have more space now:
     let infix = infix.trim_right();
     let rhs_shape = match context.config.control_style() {
-        Style::Default => {
+        Style::Legacy => {
             try_opt!(shape.sub_width(suffix.len() + prefix.len())).visual_indent(prefix.len())
         }
         Style::Rfc => {
@@ -339,7 +339,7 @@ pub fn rewrite_pair<LHS, RHS>(lhs: &LHS,
 
     let rhs_result = try_opt!(rhs.rewrite(context, rhs_shape));
     let lhs_shape = match context.config.control_style() {
-        Style::Default => {
+        Style::Legacy => {
             let lhs_overhead = shape.used_width() + prefix.len() + infix.len();
             Shape {
                 width: try_opt!(context.config.max_width().checked_sub(lhs_overhead)),
@@ -914,7 +914,7 @@ impl<'a> Rewrite for ControlFlow<'a> {
         let pat_expr_string = match self.cond {
             Some(cond) => {
                 let mut cond_shape = match context.config.control_style() {
-                    Style::Default => try_opt!(constr_shape.shrink_left(add_offset)),
+                    Style::Legacy => try_opt!(constr_shape.shrink_left(add_offset)),
                     Style::Rfc => try_opt!(constr_shape.sub_width(add_offset)),
                 };
                 if context.config.control_brace_style() != ControlBraceStyle::AlwaysNextLine {