Skip to content

Commit

Permalink
fix(formatter): default to next line in method chain
Browse files Browse the repository at this point in the history
Signed-off-by: azjezz <[email protected]>
  • Loading branch information
azjezz committed Dec 10, 2024
1 parent 6177bc1 commit ff2b17f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/formatter/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ pub struct FormatSettings {
/// ->baz();
/// ```
///
/// Default: SameLine
/// Default: NextLine
#[serde(default)]
pub method_chain_breaking_style: MethodChainBreakingStyle,
}
Expand Down Expand Up @@ -514,7 +514,7 @@ impl Default for FormatSettings {
break_promoted_properties_list: true,
space_concatenation: true,
preserve_multiline_binary_operations: true,
method_chain_breaking_style: MethodChainBreakingStyle::SameLine,
method_chain_breaking_style: MethodChainBreakingStyle::NextLine,
}
}
}
Expand Down Expand Up @@ -555,8 +555,8 @@ pub enum BraceStyle {
#[derive(Default, Debug, Clone, Copy, Eq, PartialEq, Hash, Serialize, Deserialize, PartialOrd, Ord)]
pub enum MethodChainBreakingStyle {
#[serde(alias = "same")]
#[default]
SameLine,
#[default]
#[serde(alias = "next")]
NextLine,
}
Expand Down

0 comments on commit ff2b17f

Please sign in to comment.