about summary refs log tree commit diff
path: root/src/string.rs
diff options
context:
space:
mode:
authortopecongiro <seuchida@gmail.com>2017-06-16 08:49:49 +0900
committertopecongiro <seuchida@gmail.com>2017-06-16 08:49:49 +0900
commit208ff15954c76ee0a7908e20eecb35dac6a69f72 (patch)
treecee4bda3ca2170a5da4a5cdbaf04de550b91eb67 /src/string.rs
parentd3d31a9f75c99fac12beb1341610d806f56c5d31 (diff)
Format source codes
Diffstat (limited to 'src/string.rs')
-rw-r--r--src/string.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/string.rs b/src/string.rs
index 5ba273ad272..3efb406e796 100644
--- a/src/string.rs
+++ b/src/string.rs
@@ -42,10 +42,12 @@ pub fn rewrite_string<'a>(orig: &str, fmt: &StringFormat<'a>) -> Option<String>
 
     // `cur_start` is the position in `orig` of the start of the current line.
     let mut cur_start = 0;
-    let mut result =
-        String::with_capacity(stripped_str.len().checked_next_power_of_two().unwrap_or(
-            usize::max_value(),
-        ));
+    let mut result = String::with_capacity(
+        stripped_str
+            .len()
+            .checked_next_power_of_two()
+            .unwrap_or(usize::max_value()),
+    );
     result.push_str(fmt.opener);
 
     let ender_length = fmt.line_end.len();