about summary refs log tree commit diff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorKevin Stenerson <2653498+kestred@users.noreply.github.com>2018-11-07 01:49:53 -0700
committerSeiichi Uchida <seuchida@gmail.com>2018-11-07 17:49:53 +0900
commitcd8bb50aea35f73fa4be62857dfed88f772cd07e (patch)
tree6d290160cc36277d5f7ea26697812addfbdc1f52 /src/utils.rs
parent16d5f507b63da32783bc920a33e39580d35e492a (diff)
Trim the indentation on macros which heuristically appear to use block-style indentation (#3178)
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs4
1 files changed, 2 insertions, 2 deletions
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<String> {
+pub fn trim_left_preserve_layout(orig: &str, indent: Indent, config: &Config) -> Option<String> {
     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())
         );
     }