diff options
| author | topecongiro <seuchida@gmail.com> | 2018-05-08 06:25:48 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2018-05-08 06:25:48 +0900 |
| commit | bd25c7d0f73a5b6bf888593e717be391eaeb3e58 (patch) | |
| tree | 77148bc05fd4b71315ed8ea92f15850472b954e3 /src/utils.rs | |
| parent | 0ec311ee078bea2e0d91f0f0cf821173a246110b (diff) | |
Cargo fmt
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils.rs b/src/utils.rs index f2bdc45b831..ca8a7ad7814 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -29,7 +29,8 @@ const SKIP_ANNOTATION: &str = "rustfmt_skip"; pub fn extra_offset(text: &str, shape: Shape) -> usize { match text.rfind('\n') { // 1 for newline character - Some(idx) => text.len() + Some(idx) => text + .len() .checked_sub(idx + 1 + shape.used_width()) .unwrap_or(0), None => text.len(), |
