mirror of
https://gitee.com/openharmony/third_party_rust_nom
synced 2024-11-23 07:29:54 +00:00
remove begin and rest_s parsers
This commit is contained in:
parent
f5795e0373
commit
fc0cf4d176
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user