summaryrefslogtreecommitdiffstats
path: root/vendor/winnow/src/bytes.rs
blob: 9f57a56d26b056a14e8c25624f1a4829c876b9ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//! Deprecated, see [`token`]
#![deprecated(since = "0.4.2", note = "Replaced with `token`")]

use crate::error::ParseError;
use crate::stream::StreamIsPartial;
use crate::stream::{ContainsToken, Stream};
use crate::token;
use crate::Parser;

pub use crate::token::*;

/// Deprecated, see [`token::take_while`]
#[deprecated(since = "0.4.2", note = "Replaced with `token::take_while`")]
#[inline(always)]
pub fn take_while_m_n<T, I, Error: ParseError<I>>(
    m: usize,
    n: usize,
    list: T,
) -> impl Parser<I, <I as Stream>::Slice, Error>
where
    I: StreamIsPartial,
    I: Stream,
    T: ContainsToken<<I as Stream>::Token>,
{
    token::take_while(m..=n, list)
}