diff options
| author | topecongiro <seuchida@gmail.com> | 2017-10-18 22:01:59 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2017-10-18 22:23:25 +0900 |
| commit | 0d359eacd7973e435e27aff8f22d612a69c2e7d0 (patch) | |
| tree | c17695f4a18b5f413354b3350f64f8c1887c7f0c /src/string.rs | |
| parent | 142fc45dbb7735be66ebce9efa88df80b8165175 (diff) | |
Cargo fmt
Diffstat (limited to 'src/string.rs')
| -rw-r--r-- | src/string.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/string.rs b/src/string.rs index c072d3186a2..9812b8af611 100644 --- a/src/string.rs +++ b/src/string.rs @@ -67,7 +67,9 @@ pub fn rewrite_string<'a>(orig: &str, fmt: &StringFormat<'a>) -> Option<String> let ender_length = fmt.line_end.len(); // If we cannot put at least a single character per line, the rewrite won't // succeed. - let max_chars = shape.width.checked_sub(fmt.opener.len() + ender_length + 1)? + 1; + let max_chars = shape + .width + .checked_sub(fmt.opener.len() + ender_length + 1)? + 1; // Snip a line at a time from `orig` until it is used up. Push the snippet // onto result. |
