about summary refs log tree commit diff
path: root/src/string.rs
diff options
context:
space:
mode:
authorNick Cameron <nrc@ncameron.org>2018-10-16 09:01:40 +1300
committerGitHub <noreply@github.com>2018-10-16 09:01:40 +1300
commitbc4414e53ce4e56856c360bf3a5e6c98fe072761 (patch)
tree6345e839776d5970ce04c4700c47102a6ce86cb1 /src/string.rs
parent075aa909cd2bcdc603f45e0b65119c6a7e3b2030 (diff)
parent7be173eb8c9e043fbe814970c93dc7d98ddc8009 (diff)
Merge pull request #3101 from nrc/pair-newline
Simplify multi-lining binop exprs
Diffstat (limited to 'src/string.rs')
-rw-r--r--src/string.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/string.rs b/src/string.rs
index ca063123e39..f98c4189ea5 100644
--- a/src/string.rs
+++ b/src/string.rs
@@ -291,11 +291,12 @@ fn break_string(max_chars: usize, trim_end: bool, line_end: &str, input: &[&str]
         return break_at(max_chars - 1);
     }
     if let Some(url_index_end) = detect_url(input, max_chars) {
-        let index_plus_ws = url_index_end + input[url_index_end..]
-            .iter()
-            .skip(1)
-            .position(|grapheme| not_whitespace_except_line_feed(grapheme))
-            .unwrap_or(0);
+        let index_plus_ws = url_index_end
+            + input[url_index_end..]
+                .iter()
+                .skip(1)
+                .position(|grapheme| not_whitespace_except_line_feed(grapheme))
+                .unwrap_or(0);
         return if trim_end {
             SnippetState::LineEnd(
                 input[..=url_index_end].join("").to_string(),