remove begin and rest_s parsers

This commit is contained in:
Geoffroy Couprie 2019-05-06 12:15:00 +02:00
parent f5795e0373
commit fc0cf4d176
2 changed files with 1 additions and 12 deletions

View File

@ -26,6 +26,7 @@
- `take_until_either`, `take_until_either1`, `take_until_either_and_consume` and `take_until_either_and_consume1`: they can be replaced with `is_not` (possibly combined with something else)
- `take_until_and_consume`, `take_until_and_consume1`: they can be replaced with `take_until` combined with `take`
- `sized_buffer` and `length_bytes!`: they can be replaced with the `length_data` function
- `begin` and `rest_s` function
## 4.2.3 - 2019-03-23

View File

@ -18,12 +18,6 @@ use lib::std::mem::transmute;
#[macro_use]
mod macros;
#[inline]
// FIXME: remove?
pub fn begin(input: &[u8]) -> IResult<(), &[u8]> {
Ok(((), input))
}
/// Recognizes non empty buffers
#[inline]
pub fn non_empty<T, E: ParseError<T>>(input: T) -> IResult<T, T, E>
@ -59,12 +53,6 @@ where
Ok((input, len))
}
/// Return the remaining input, for strings.
#[inline]
pub fn rest_s<'a, E: ParseError<&'a str>>(input: &'a str) -> IResult<&'a str, &'a str, E> {
Ok((&input[input.len()..], input))
}
/// maps a function on the result of a parser
///
/// ```rust