diff options
Diffstat (limited to 'src/string.rs')
| -rw-r--r-- | src/string.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/string.rs b/src/string.rs index cb174841738..8b910c0b4ce 100644 --- a/src/string.rs +++ b/src/string.rs @@ -1,13 +1,3 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - // Format string literals. use regex::Regex; @@ -163,8 +153,8 @@ pub fn rewrite_string<'a>( wrap_str(result, fmt.config.max_width(), fmt.shape) } -/// Returns the index to the end of the url if the given string includes an -/// URL or alike. Otherwise, returns None; +/// Returns the index to the end of the URL if the given string includes an +/// URL or alike. Otherwise, returns `None`; fn detect_url(s: &[&str], index: usize) -> Option<usize> { let start = match s[..=index].iter().rposition(|g| is_whitespace(g)) { Some(pos) => pos + 1, |
