From cd8bb50aea35f73fa4be62857dfed88f772cd07e Mon Sep 17 00:00:00 2001 From: Kevin Stenerson <2653498+kestred@users.noreply.github.com> Date: Wed, 7 Nov 2018 01:49:53 -0700 Subject: Trim the indentation on macros which heuristically appear to use block-style indentation (#3178) --- src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index 86c01af39fb..c5f9a5eda5e 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -511,7 +511,7 @@ pub fn remove_trailing_white_spaces(text: &str) -> String { /// ), /// } /// ``` -pub fn trim_left_preserve_layout(orig: &str, indent: &Indent, config: &Config) -> Option { +pub fn trim_left_preserve_layout(orig: &str, indent: Indent, config: &Config) -> Option { let mut lines = LineClasses::new(orig); let first_line = lines.next().map(|(_, s)| s.trim_right().to_owned())?; let mut trimmed_lines = Vec::with_capacity(16); @@ -598,7 +598,7 @@ mod test { let config = Config::default(); let indent = Indent::new(4, 0); assert_eq!( - trim_left_preserve_layout(&s, &indent, &config), + trim_left_preserve_layout(&s, indent, &config), Some("aaa\n bbb\n ccc".to_string()) ); } -- cgit 1.4.1-3-g733a5