diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2018-10-15 11:52:27 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2018-10-15 11:52:27 +1300 |
| commit | cbd568083d87a90dfe5ab0e90f404454946c9f20 (patch) | |
| tree | 809815e26d449cf2bd289c231985cf0c321d020f /src/string.rs | |
| parent | b81b9028215dbb89cd8e16d783ccd146e1d4c162 (diff) | |
Fixup formatting
Diffstat (limited to 'src/string.rs')
| -rw-r--r-- | src/string.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/string.rs b/src/string.rs index 2fe13db2139..b3f6daadfac 100644 --- a/src/string.rs +++ b/src/string.rs @@ -287,11 +287,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(), |
