From 482f200b0b3f7e6b248c38e463bc231c53263199 Mon Sep 17 00:00:00 2001 From: Marcus Klaas Date: Fri, 26 Jun 2015 03:29:54 +0200 Subject: Update import list formatting Include comments and sort items alphabetically. --- src/string.rs | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/string.rs') 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 { - s.find(a).and_then(|i| { - match s.find(b) { - Some(j) if j <= i => None, - _ => Some(i) - } - }) -} -- cgit 1.4.1-3-g733a5