diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2017-03-28 11:14:47 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2017-03-28 11:14:47 +1300 |
| commit | 5fb1140688ae9e8a0cfc9d90a00f7dad4935e029 (patch) | |
| tree | 861133499fd946915cfd2c49dbaa3e4976ea46a9 /src/string.rs | |
| parent | a079b87e7c7a937bd689e51af5c2c2b4ba690ca7 (diff) | |
fallout - source reformatting
Diffstat (limited to 'src/string.rs')
| -rw-r--r-- | src/string.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/string.rs b/src/string.rs index 37a569ce67d..e1e0681ba56 100644 --- a/src/string.rs +++ b/src/string.rs @@ -51,7 +51,10 @@ 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 = try_opt!(shape.width.checked_sub(fmt.opener.len() + ender_length + 1)) + 1; + let max_chars = try_opt!(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. |
