diff options
| author | Marcus Klaas <mail@marcusklaas.nl> | 2015-06-26 03:29:54 +0200 |
|---|---|---|
| committer | Marcus Klaas <mail@marcusklaas.nl> | 2015-06-26 03:43:12 +0200 |
| commit | 482f200b0b3f7e6b248c38e463bc231c53263199 (patch) | |
| tree | 473521b7c36d61d2eff9ec1c0defae5c7471dea8 /src/string.rs | |
| parent | 8cef6785bf29f98f49dce5fa62e54606e7f5b948 (diff) | |
Update import list formatting
Include comments and sort items alphabetically.
Diffstat (limited to 'src/string.rs')
| -rw-r--r-- | src/string.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/string.rs b/src/string.rs index d474fdb468e..413237e182c 100644 --- a/src/string.rs +++ b/src/string.rs @@ -88,16 +88,3 @@ pub fn rewrite_string<'a>(s: &str, fmt: &StringFormat<'a>) -> String { result } - -#[inline] -// Checks if a appears before b in given string and, if so, returns the index of -// a. -// FIXME: could be more generic -pub fn before<'x>(s: &'x str, a: &str, b: &str) -> Option<usize> { - s.find(a).and_then(|i| { - match s.find(b) { - Some(j) if j <= i => None, - _ => Some(i) - } - }) -} |
