Skip to content

Commit

Permalink
remove begin and rest_s parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed May 6, 2019
1 parent f5795e0 commit fc0cf4d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 0 additions & 12 deletions src/combinator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fc0cf4d

Please sign in to comment.