diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2017-06-13 14:49:47 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2017-06-13 14:49:47 +1200 |
| commit | 18ccd0190ee6ef4a6e1bb9d737e515b872009711 (patch) | |
| tree | 975ea2d02abb8da3ad0222684606c6e2b2c4e1ef /src/string.rs | |
| parent | 6f30d9e7c973d7bee78f8d16aa623f679c37bcae (diff) | |
Rebasing
Diffstat (limited to 'src/string.rs')
| -rw-r--r-- | src/string.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/string.rs b/src/string.rs index 904260e8182..6c20c18ca47 100644 --- a/src/string.rs +++ b/src/string.rs @@ -42,12 +42,10 @@ 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(); |
