Factor out handling of leading whitespace
diff --git a/src/lib.rs b/src/lib.rs
index 043e164..3af64bf 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -150,10 +150,7 @@
                  -> Result<T, String> {
         match f(input) {
             IResult::Done(mut rest, t) => {
-                rest = match space::whitespace(rest) {
-                    IResult::Done(rest, _) => rest,
-                    IResult::Error => rest,
-                };
+                rest = space::skip_whitespace(rest);
                 if rest.is_empty() {
                     Ok(t)
                 } else if rest.len() == input.len() {