/rust/registry/src/index.crates.io-1949cf8c6b5b557f/winnow-0.7.15/src/token/mod.rs
Line | Count | Source |
1 | | //! Parsers extracting tokens from the stream |
2 | | |
3 | | #[cfg(test)] |
4 | | mod tests; |
5 | | |
6 | | use crate::combinator::trace; |
7 | | use crate::combinator::DisplayDebug; |
8 | | use crate::error::Needed; |
9 | | use crate::error::ParserError; |
10 | | use crate::stream::Range; |
11 | | use crate::stream::{Compare, CompareResult, ContainsToken, FindSlice, Stream}; |
12 | | use crate::stream::{StreamIsPartial, ToUsize}; |
13 | | use crate::Parser; |
14 | | use crate::Result; |
15 | | use core::result::Result::Ok; |
16 | | |
17 | | /// Matches one token |
18 | | /// |
19 | | /// *Complete version*: Will return an error if there's not enough input data. |
20 | | /// |
21 | | /// *[Partial version][crate::_topic::partial]*: Will return `Err(winnow::error::ErrMode::Incomplete(_))` if there's not enough input data. |
22 | | /// |
23 | | /// # Effective Signature |
24 | | /// |
25 | | /// Assuming you are parsing a `&str` [Stream]: |
26 | | /// ```rust |
27 | | /// # use winnow::prelude::*;; |
28 | | /// pub fn any(input: &mut &str) -> ModalResult<char> |
29 | | /// # { |
30 | | /// # winnow::token::any.parse_next(input) |
31 | | /// # } |
32 | | /// ``` |
33 | | /// |
34 | | /// # Example |
35 | | /// |
36 | | /// ```rust |
37 | | /// # use winnow::{token::any, error::ErrMode, error::ContextError}; |
38 | | /// # use winnow::prelude::*; |
39 | | /// fn parser(input: &mut &str) -> ModalResult<char> { |
40 | | /// any.parse_next(input) |
41 | | /// } |
42 | | /// |
43 | | /// assert_eq!(parser.parse_peek("abc"), Ok(("bc",'a'))); |
44 | | /// assert!(parser.parse_peek("").is_err()); |
45 | | /// ``` |
46 | | /// |
47 | | /// ```rust |
48 | | /// # use winnow::{token::any, error::ErrMode, error::ContextError, error::Needed}; |
49 | | /// # use winnow::prelude::*; |
50 | | /// # use winnow::Partial; |
51 | | /// assert_eq!(any::<_, ErrMode<ContextError>>.parse_peek(Partial::new("abc")), Ok((Partial::new("bc"),'a'))); |
52 | | /// assert_eq!(any::<_, ErrMode<ContextError>>.parse_peek(Partial::new("")), Err(ErrMode::Incomplete(Needed::new(1)))); |
53 | | /// ``` |
54 | | #[inline(always)] |
55 | | #[doc(alias = "token")] |
56 | 195M | pub fn any<Input, Error>(input: &mut Input) -> Result<<Input as Stream>::Token, Error> |
57 | 195M | where |
58 | 195M | Input: StreamIsPartial + Stream, |
59 | 195M | Error: ParserError<Input>, |
60 | | { |
61 | 195M | trace("any", move |input: &mut Input| { |
62 | 195M | if <Input as StreamIsPartial>::is_partial_supported() { |
63 | 0 | any_::<_, _, true>(input) |
64 | | } else { |
65 | 195M | any_::<_, _, false>(input) |
66 | | } |
67 | 195M | }) |
68 | 195M | .parse_next(input) |
69 | 195M | } |
70 | | |
71 | 195M | fn any_<I, E: ParserError<I>, const PARTIAL: bool>(input: &mut I) -> Result<<I as Stream>::Token, E> |
72 | 195M | where |
73 | 195M | I: StreamIsPartial, |
74 | 195M | I: Stream, |
75 | | { |
76 | 195M | input.next_token().ok_or_else(|| { |
77 | 51.4k | if PARTIAL && input.is_partial() { |
78 | 0 | ParserError::incomplete(input, Needed::new(1)) |
79 | | } else { |
80 | 51.4k | ParserError::from_input(input) |
81 | | } |
82 | 51.4k | }) winnow::token::any_::<&[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>::{closure#0}Line | Count | Source | 76 | 51.4k | input.next_token().ok_or_else(|| { | 77 | 51.4k | if PARTIAL && input.is_partial() { | 78 | 0 | ParserError::incomplete(input, Needed::new(1)) | 79 | | } else { | 80 | 51.4k | ParserError::from_input(input) | 81 | | } | 82 | 51.4k | }) |
Unexecuted instantiation: winnow::token::any_::<&[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>::{closure#0} |
83 | 195M | } winnow::token::any_::<&[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false> Line | Count | Source | 71 | 195M | fn any_<I, E: ParserError<I>, const PARTIAL: bool>(input: &mut I) -> Result<<I as Stream>::Token, E> | 72 | 195M | where | 73 | 195M | I: StreamIsPartial, | 74 | 195M | I: Stream, | 75 | | { | 76 | 195M | input.next_token().ok_or_else(|| { | 77 | | if PARTIAL && input.is_partial() { | 78 | | ParserError::incomplete(input, Needed::new(1)) | 79 | | } else { | 80 | | ParserError::from_input(input) | 81 | | } | 82 | | }) | 83 | 195M | } |
Unexecuted instantiation: winnow::token::any_::<&[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true> |
84 | | |
85 | | /// Recognizes a literal |
86 | | /// |
87 | | /// The input data will be compared to the literal combinator's argument and will return the part of |
88 | | /// the input that matches the argument |
89 | | /// |
90 | | /// It will return `Err(ErrMode::Backtrack(_))` if the input doesn't match the literal |
91 | | /// |
92 | | /// <div class="warning"> |
93 | | /// |
94 | | /// **Note:** [`Parser`] is implemented for strings and byte strings as a convenience (complete |
95 | | /// only) |
96 | | /// |
97 | | /// </div> |
98 | | /// |
99 | | /// # Effective Signature |
100 | | /// |
101 | | /// Assuming you are parsing a `&str` [Stream]: |
102 | | /// ```rust |
103 | | /// # use winnow::prelude::*;; |
104 | | /// # use winnow::error::ContextError; |
105 | | /// pub fn literal(literal: &str) -> impl Parser<&str, &str, ContextError> |
106 | | /// # { |
107 | | /// # winnow::token::literal(literal) |
108 | | /// # } |
109 | | /// ``` |
110 | | /// |
111 | | /// # Example |
112 | | /// ```rust |
113 | | /// # use winnow::prelude::*; |
114 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
115 | | /// # |
116 | | /// fn parser<'i>(s: &mut &'i str) -> ModalResult<&'i str> { |
117 | | /// "Hello".parse_next(s) |
118 | | /// } |
119 | | /// |
120 | | /// assert_eq!(parser.parse_peek("Hello, World!"), Ok((", World!", "Hello"))); |
121 | | /// assert!(parser.parse_peek("Something").is_err()); |
122 | | /// assert!(parser.parse_peek("").is_err()); |
123 | | /// ``` |
124 | | /// |
125 | | /// ```rust |
126 | | /// # use winnow::prelude::*; |
127 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
128 | | /// # use winnow::Partial; |
129 | | /// |
130 | | /// fn parser<'i>(s: &mut Partial<&'i str>) -> ModalResult<&'i str> { |
131 | | /// "Hello".parse_next(s) |
132 | | /// } |
133 | | /// |
134 | | /// assert_eq!(parser.parse_peek(Partial::new("Hello, World!")), Ok((Partial::new(", World!"), "Hello"))); |
135 | | /// assert!(parser.parse_peek(Partial::new("Something")).is_err()); |
136 | | /// assert!(parser.parse_peek(Partial::new("S")).is_err()); |
137 | | /// assert_eq!(parser.parse_peek(Partial::new("H")), Err(ErrMode::Incomplete(Needed::Unknown))); |
138 | | /// ``` |
139 | | /// |
140 | | /// ```rust |
141 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
142 | | /// # use winnow::prelude::*; |
143 | | /// use winnow::token::literal; |
144 | | /// use winnow::ascii::Caseless; |
145 | | /// |
146 | | /// fn parser<'i>(s: &mut &'i str) -> ModalResult<&'i str> { |
147 | | /// literal(Caseless("hello")).parse_next(s) |
148 | | /// } |
149 | | /// |
150 | | /// assert_eq!(parser.parse_peek("Hello, World!"), Ok((", World!", "Hello"))); |
151 | | /// assert_eq!(parser.parse_peek("hello, World!"), Ok((", World!", "hello"))); |
152 | | /// assert_eq!(parser.parse_peek("HeLlO, World!"), Ok((", World!", "HeLlO"))); |
153 | | /// assert!(parser.parse_peek("Something").is_err()); |
154 | | /// assert!(parser.parse_peek("").is_err()); |
155 | | /// ``` |
156 | | #[inline(always)] |
157 | | #[doc(alias = "tag")] |
158 | | #[doc(alias = "bytes")] |
159 | | #[doc(alias = "just")] |
160 | 337M | pub fn literal<Literal, Input, Error>( |
161 | 337M | literal: Literal, |
162 | 337M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> |
163 | 337M | where |
164 | 337M | Input: StreamIsPartial + Stream + Compare<Literal>, |
165 | 337M | Literal: Clone + core::fmt::Debug, |
166 | 337M | Error: ParserError<Input>, |
167 | | { |
168 | 337M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { |
169 | 337M | let t = literal.clone(); |
170 | 337M | if <Input as StreamIsPartial>::is_partial_supported() { |
171 | 0 | literal_::<_, _, _, true>(i, t) |
172 | | } else { |
173 | 337M | literal_::<_, _, _, false>(i, t) |
174 | | } |
175 | 337M | }) winnow::token::literal::<&str, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>>::{closure#0}Line | Count | Source | 168 | 261M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 261M | let t = literal.clone(); | 170 | 261M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 261M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 261M | }) |
winnow::token::literal::<char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>>::{closure#0}Line | Count | Source | 168 | 56.1M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 56.1M | let t = literal.clone(); | 170 | 56.1M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 56.1M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 56.1M | }) |
Unexecuted instantiation: winnow::token::literal::<&[u8; 18], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<winnow::error::ContextError>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<winnow::error::ContextError>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&str, &[u8], winnow::error::ErrMode<winnow::error::ContextError>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<u8, &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>>::{closure#0}winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>>::{closure#0}Line | Count | Source | 168 | 5.68k | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 5.68k | let t = literal.clone(); | 170 | 5.68k | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 5.68k | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 5.68k | }) |
Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>>::{closure#0}winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>>::{closure#0}Line | Count | Source | 168 | 13.1M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 13.1M | let t = literal.clone(); | 170 | 13.1M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 13.1M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 13.1M | }) |
winnow::token::literal::<&[u8; 18], &[u8], winnow::error::ErrMode<()>>::{closure#0}Line | Count | Source | 168 | 25 | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 25 | let t = literal.clone(); | 170 | 25 | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 25 | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 25 | }) |
Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<winnow::error::ContextError>>::{closure#0}winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>>::{closure#0}Line | Count | Source | 168 | 5.17M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 5.17M | let t = literal.clone(); | 170 | 5.17M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 5.17M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 5.17M | }) |
Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<winnow::error::ContextError>>::{closure#0}winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>>::{closure#0}Line | Count | Source | 168 | 1.69M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 1.69M | let t = literal.clone(); | 170 | 1.69M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 1.69M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 1.69M | }) |
Unexecuted instantiation: winnow::token::literal::<&str, &[u8], winnow::error::ErrMode<winnow::error::ContextError>>::{closure#0}winnow::token::literal::<u8, &[u8], winnow::error::ErrMode<()>>::{closure#0}Line | Count | Source | 168 | 160k | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 160k | let t = literal.clone(); | 170 | 160k | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 160k | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 160k | }) |
Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>>::{closure#0} |
176 | 337M | } winnow::token::literal::<&str, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>> Line | Count | Source | 160 | 261M | pub fn literal<Literal, Input, Error>( | 161 | 261M | literal: Literal, | 162 | 261M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 261M | where | 164 | 261M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 261M | Literal: Clone + core::fmt::Debug, | 166 | 261M | Error: ParserError<Input>, | 167 | | { | 168 | 261M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | | let t = literal.clone(); | 170 | | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | | }) | 176 | 261M | } |
winnow::token::literal::<char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>> Line | Count | Source | 160 | 56.1M | pub fn literal<Literal, Input, Error>( | 161 | 56.1M | literal: Literal, | 162 | 56.1M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 56.1M | where | 164 | 56.1M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 56.1M | Literal: Clone + core::fmt::Debug, | 166 | 56.1M | Error: ParserError<Input>, | 167 | | { | 168 | 56.1M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | | let t = literal.clone(); | 170 | | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | | }) | 176 | 56.1M | } |
Unexecuted instantiation: winnow::token::literal::<&[u8; 18], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<winnow::error::ContextError>> Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<winnow::error::ContextError>> Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&str, &[u8], winnow::error::ErrMode<winnow::error::ContextError>> Unexecuted instantiation: winnow::token::literal::<u8, &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>> winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>> Line | Count | Source | 160 | 5.68k | pub fn literal<Literal, Input, Error>( | 161 | 5.68k | literal: Literal, | 162 | 5.68k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 5.68k | where | 164 | 5.68k | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 5.68k | Literal: Clone + core::fmt::Debug, | 166 | 5.68k | Error: ParserError<Input>, | 167 | | { | 168 | 5.68k | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | | let t = literal.clone(); | 170 | | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | | }) | 176 | 5.68k | } |
Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>> winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>> Line | Count | Source | 160 | 13.1M | pub fn literal<Literal, Input, Error>( | 161 | 13.1M | literal: Literal, | 162 | 13.1M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 13.1M | where | 164 | 13.1M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 13.1M | Literal: Clone + core::fmt::Debug, | 166 | 13.1M | Error: ParserError<Input>, | 167 | | { | 168 | 13.1M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | | let t = literal.clone(); | 170 | | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | | }) | 176 | 13.1M | } |
winnow::token::literal::<&[u8; 18], &[u8], winnow::error::ErrMode<()>> Line | Count | Source | 160 | 25 | pub fn literal<Literal, Input, Error>( | 161 | 25 | literal: Literal, | 162 | 25 | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 25 | where | 164 | 25 | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 25 | Literal: Clone + core::fmt::Debug, | 166 | 25 | Error: ParserError<Input>, | 167 | | { | 168 | 25 | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | | let t = literal.clone(); | 170 | | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | | }) | 176 | 25 | } |
Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<winnow::error::ContextError>> winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>> Line | Count | Source | 160 | 5.17M | pub fn literal<Literal, Input, Error>( | 161 | 5.17M | literal: Literal, | 162 | 5.17M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 5.17M | where | 164 | 5.17M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 5.17M | Literal: Clone + core::fmt::Debug, | 166 | 5.17M | Error: ParserError<Input>, | 167 | | { | 168 | 5.17M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | | let t = literal.clone(); | 170 | | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | | }) | 176 | 5.17M | } |
Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<winnow::error::ContextError>> winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>> Line | Count | Source | 160 | 1.69M | pub fn literal<Literal, Input, Error>( | 161 | 1.69M | literal: Literal, | 162 | 1.69M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 1.69M | where | 164 | 1.69M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 1.69M | Literal: Clone + core::fmt::Debug, | 166 | 1.69M | Error: ParserError<Input>, | 167 | | { | 168 | 1.69M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | | let t = literal.clone(); | 170 | | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | | }) | 176 | 1.69M | } |
Unexecuted instantiation: winnow::token::literal::<&str, &[u8], winnow::error::ErrMode<winnow::error::ContextError>> winnow::token::literal::<u8, &[u8], winnow::error::ErrMode<()>> Line | Count | Source | 160 | 160k | pub fn literal<Literal, Input, Error>( | 161 | 160k | literal: Literal, | 162 | 160k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 160k | where | 164 | 160k | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 160k | Literal: Clone + core::fmt::Debug, | 166 | 160k | Error: ParserError<Input>, | 167 | | { | 168 | 160k | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | | let t = literal.clone(); | 170 | | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | | }) | 176 | 160k | } |
Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8; 1], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>> |
177 | | |
178 | 337M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( |
179 | 337M | i: &mut I, |
180 | 337M | t: T, |
181 | 337M | ) -> Result<<I as Stream>::Slice, Error> |
182 | 337M | where |
183 | 337M | I: StreamIsPartial, |
184 | 337M | I: Stream + Compare<T>, |
185 | 337M | T: core::fmt::Debug, |
186 | | { |
187 | 337M | match i.compare(t) { |
188 | 99.7M | CompareResult::Ok(len) => Ok(i.next_slice(len)), |
189 | 250k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { |
190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) |
191 | | } |
192 | 238M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), |
193 | | } |
194 | 337M | } winnow::token::literal_::<&str, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false> Line | Count | Source | 178 | 261M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 261M | i: &mut I, | 180 | 261M | t: T, | 181 | 261M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 261M | where | 183 | 261M | I: StreamIsPartial, | 184 | 261M | I: Stream + Compare<T>, | 185 | 261M | T: core::fmt::Debug, | 186 | | { | 187 | 261M | match i.compare(t) { | 188 | 57.0M | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 59.3k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 204M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 261M | } |
Unexecuted instantiation: winnow::token::literal_::<&str, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true> winnow::token::literal_::<char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false> Line | Count | Source | 178 | 56.1M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 56.1M | i: &mut I, | 180 | 56.1M | t: T, | 181 | 56.1M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 56.1M | where | 183 | 56.1M | I: StreamIsPartial, | 184 | 56.1M | I: Stream + Compare<T>, | 185 | 56.1M | T: core::fmt::Debug, | 186 | | { | 187 | 56.1M | match i.compare(t) { | 188 | 28.4M | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 14.9k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 27.6M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 56.1M | } |
Unexecuted instantiation: winnow::token::literal_::<char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 18], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 18], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&str, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false> Unexecuted instantiation: winnow::token::literal_::<&str, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true> Unexecuted instantiation: winnow::token::literal_::<u8, &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<u8, &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, false> Line | Count | Source | 178 | 5.68k | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 5.68k | i: &mut I, | 180 | 5.68k | t: T, | 181 | 5.68k | ) -> Result<<I as Stream>::Slice, Error> | 182 | 5.68k | where | 183 | 5.68k | I: StreamIsPartial, | 184 | 5.68k | I: Stream + Compare<T>, | 185 | 5.68k | T: core::fmt::Debug, | 186 | | { | 187 | 5.68k | match i.compare(t) { | 188 | 532 | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 640 | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 5.15k | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 5.68k | } |
Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, true> winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Line | Count | Source | 178 | 13.1M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 13.1M | i: &mut I, | 180 | 13.1M | t: T, | 181 | 13.1M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 13.1M | where | 183 | 13.1M | I: StreamIsPartial, | 184 | 13.1M | I: Stream + Compare<T>, | 185 | 13.1M | T: core::fmt::Debug, | 186 | | { | 187 | 13.1M | match i.compare(t) { | 188 | 10.5M | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 3.86k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 2.58M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 13.1M | } |
Unexecuted instantiation: winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> winnow::token::literal_::<&[u8; 18], &[u8], winnow::error::ErrMode<()>, false> Line | Count | Source | 178 | 25 | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 25 | i: &mut I, | 180 | 25 | t: T, | 181 | 25 | ) -> Result<<I as Stream>::Slice, Error> | 182 | 25 | where | 183 | 25 | I: StreamIsPartial, | 184 | 25 | I: Stream + Compare<T>, | 185 | 25 | T: core::fmt::Debug, | 186 | | { | 187 | 25 | match i.compare(t) { | 188 | 0 | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 11 | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 25 | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 25 | } |
Unexecuted instantiation: winnow::token::literal_::<&[u8; 18], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true> winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, false> Line | Count | Source | 178 | 5.17M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 5.17M | i: &mut I, | 180 | 5.17M | t: T, | 181 | 5.17M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 5.17M | where | 183 | 5.17M | I: StreamIsPartial, | 184 | 5.17M | I: Stream + Compare<T>, | 185 | 5.17M | T: core::fmt::Debug, | 186 | | { | 187 | 5.17M | match i.compare(t) { | 188 | 3.59M | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 29.4k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 1.58M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 5.17M | } |
Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true> winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, false> Line | Count | Source | 178 | 1.69M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 1.69M | i: &mut I, | 180 | 1.69M | t: T, | 181 | 1.69M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 1.69M | where | 183 | 1.69M | I: StreamIsPartial, | 184 | 1.69M | I: Stream + Compare<T>, | 185 | 1.69M | T: core::fmt::Debug, | 186 | | { | 187 | 1.69M | match i.compare(t) { | 188 | 53.3k | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 19 | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 1.64M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 1.69M | } |
Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&str, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false> Unexecuted instantiation: winnow::token::literal_::<&str, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true> winnow::token::literal_::<u8, &[u8], winnow::error::ErrMode<()>, false> Line | Count | Source | 178 | 160k | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 160k | i: &mut I, | 180 | 160k | t: T, | 181 | 160k | ) -> Result<<I as Stream>::Slice, Error> | 182 | 160k | where | 183 | 160k | I: StreamIsPartial, | 184 | 160k | I: Stream + Compare<T>, | 185 | 160k | T: core::fmt::Debug, | 186 | | { | 187 | 160k | match i.compare(t) { | 188 | 1.23k | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 142k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 159k | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 160k | } |
Unexecuted instantiation: winnow::token::literal_::<u8, &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 1], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8; 2], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::literal_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> |
195 | | |
196 | | /// Recognize a token that matches a [set of tokens][ContainsToken] |
197 | | /// |
198 | | /// <div class="warning"> |
199 | | /// |
200 | | /// **Note:** [`Parser`] is implemented as a convenience (complete |
201 | | /// only) for |
202 | | /// - `u8` |
203 | | /// - `char` |
204 | | /// |
205 | | /// </div> |
206 | | /// |
207 | | /// *Complete version*: Will return an error if there's not enough input data. |
208 | | /// |
209 | | /// *[Partial version][crate::_topic::partial]*: Will return `Err(winnow::error::ErrMode::Incomplete(_))` if there's not enough input data. |
210 | | /// |
211 | | /// # Effective Signature |
212 | | /// |
213 | | /// Assuming you are parsing a `&str` [Stream]: |
214 | | /// ```rust |
215 | | /// # use winnow::prelude::*;; |
216 | | /// # use winnow::stream::ContainsToken; |
217 | | /// # use winnow::error::ContextError; |
218 | | /// pub fn one_of<'i>(set: impl ContainsToken<char>) -> impl Parser<&'i str, char, ContextError> |
219 | | /// # { |
220 | | /// # winnow::token::one_of(set) |
221 | | /// # } |
222 | | /// ``` |
223 | | /// |
224 | | /// # Example |
225 | | /// |
226 | | /// ```rust |
227 | | /// # use winnow::prelude::*; |
228 | | /// # use winnow::{error::ErrMode, error::ContextError}; |
229 | | /// # use winnow::token::one_of; |
230 | | /// assert_eq!(one_of::<_, _, ContextError>(['a', 'b', 'c']).parse_peek("b"), Ok(("", 'b'))); |
231 | | /// assert!(one_of::<_, _, ContextError>('a').parse_peek("bc").is_err()); |
232 | | /// assert!(one_of::<_, _, ContextError>('a').parse_peek("").is_err()); |
233 | | /// |
234 | | /// fn parser_fn(i: &mut &str) -> ModalResult<char> { |
235 | | /// one_of(|c| c == 'a' || c == 'b').parse_next(i) |
236 | | /// } |
237 | | /// assert_eq!(parser_fn.parse_peek("abc"), Ok(("bc", 'a'))); |
238 | | /// assert!(parser_fn.parse_peek("cd").is_err()); |
239 | | /// assert!(parser_fn.parse_peek("").is_err()); |
240 | | /// ``` |
241 | | /// |
242 | | /// ```rust |
243 | | /// # use winnow::prelude::*; |
244 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
245 | | /// # use winnow::Partial; |
246 | | /// # use winnow::token::one_of; |
247 | | /// assert_eq!(one_of::<_, _, ErrMode<ContextError>>(['a', 'b', 'c']).parse_peek(Partial::new("b")), Ok((Partial::new(""), 'b'))); |
248 | | /// assert!(one_of::<_, _, ErrMode<ContextError>>('a').parse_peek(Partial::new("bc")).is_err()); |
249 | | /// assert_eq!(one_of::<_, _, ErrMode<ContextError>>('a').parse_peek(Partial::new("")), Err(ErrMode::Incomplete(Needed::new(1)))); |
250 | | /// |
251 | | /// fn parser_fn(i: &mut Partial<&str>) -> ModalResult<char> { |
252 | | /// one_of(|c| c == 'a' || c == 'b').parse_next(i) |
253 | | /// } |
254 | | /// assert_eq!(parser_fn.parse_peek(Partial::new("abc")), Ok((Partial::new("bc"), 'a'))); |
255 | | /// assert!(parser_fn.parse_peek(Partial::new("cd")).is_err()); |
256 | | /// assert_eq!(parser_fn.parse_peek(Partial::new("")), Err(ErrMode::Incomplete(Needed::new(1)))); |
257 | | /// ``` |
258 | | #[inline(always)] |
259 | | #[doc(alias = "char")] |
260 | | #[doc(alias = "token")] |
261 | | #[doc(alias = "satisfy")] |
262 | 196M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> |
263 | 196M | where |
264 | 196M | Input: StreamIsPartial + Stream, |
265 | 196M | <Input as Stream>::Token: Clone, |
266 | 196M | Set: ContainsToken<<Input as Stream>::Token>, |
267 | 196M | Error: ParserError<Input>, |
268 | | { |
269 | 196M | trace( |
270 | | "one_of", |
271 | 196M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), winnow::token::one_of::<&[u8], [char; 2], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>>::{closure#0}Line | Count | Source | 271 | 97.6M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), |
winnow::token::one_of::<&[u8], gix_config::parse::nom::config_name::{closure#0}, winnow::error::ErrMode<winnow::error::InputError<&[u8]>>>::{closure#0}Line | Count | Source | 271 | 71.0M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), |
winnow::token::one_of::<&[u8], gix_config::parse::nom::is_subsection_escapable_char, winnow::error::ErrMode<winnow::error::InputError<&[u8]>>>::{closure#0}Line | Count | Source | 271 | 3.29M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), |
winnow::token::one_of::<&[u8], char, winnow::error::ErrMode<winnow::error::InputError<&[u8]>>>::{closure#0}Line | Count | Source | 271 | 23.2M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), |
|
272 | | ) |
273 | 196M | } winnow::token::one_of::<&[u8], [char; 2], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>> Line | Count | Source | 262 | 97.7M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> | 263 | 97.7M | where | 264 | 97.7M | Input: StreamIsPartial + Stream, | 265 | 97.7M | <Input as Stream>::Token: Clone, | 266 | 97.7M | Set: ContainsToken<<Input as Stream>::Token>, | 267 | 97.7M | Error: ParserError<Input>, | 268 | | { | 269 | 97.7M | trace( | 270 | | "one_of", | 271 | 97.7M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), | 272 | | ) | 273 | 97.7M | } |
winnow::token::one_of::<&[u8], gix_config::parse::nom::config_name::{closure#0}, winnow::error::ErrMode<winnow::error::InputError<&[u8]>>>Line | Count | Source | 262 | 71.0M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> | 263 | 71.0M | where | 264 | 71.0M | Input: StreamIsPartial + Stream, | 265 | 71.0M | <Input as Stream>::Token: Clone, | 266 | 71.0M | Set: ContainsToken<<Input as Stream>::Token>, | 267 | 71.0M | Error: ParserError<Input>, | 268 | | { | 269 | 71.0M | trace( | 270 | | "one_of", | 271 | 71.0M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), | 272 | | ) | 273 | 71.0M | } |
winnow::token::one_of::<&[u8], gix_config::parse::nom::is_subsection_escapable_char, winnow::error::ErrMode<winnow::error::InputError<&[u8]>>> Line | Count | Source | 262 | 4.69M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> | 263 | 4.69M | where | 264 | 4.69M | Input: StreamIsPartial + Stream, | 265 | 4.69M | <Input as Stream>::Token: Clone, | 266 | 4.69M | Set: ContainsToken<<Input as Stream>::Token>, | 267 | 4.69M | Error: ParserError<Input>, | 268 | | { | 269 | 4.69M | trace( | 270 | | "one_of", | 271 | 4.69M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), | 272 | | ) | 273 | 4.69M | } |
winnow::token::one_of::<&[u8], char, winnow::error::ErrMode<winnow::error::InputError<&[u8]>>> Line | Count | Source | 262 | 23.2M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> | 263 | 23.2M | where | 264 | 23.2M | Input: StreamIsPartial + Stream, | 265 | 23.2M | <Input as Stream>::Token: Clone, | 266 | 23.2M | Set: ContainsToken<<Input as Stream>::Token>, | 267 | 23.2M | Error: ParserError<Input>, | 268 | | { | 269 | 23.2M | trace( | 270 | | "one_of", | 271 | 23.2M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), | 272 | | ) | 273 | 23.2M | } |
|
274 | | |
275 | | /// Recognize a token that does not match a [set of tokens][ContainsToken] |
276 | | /// |
277 | | /// *Complete version*: Will return an error if there's not enough input data. |
278 | | /// |
279 | | /// *[Partial version][crate::_topic::partial]*: Will return `Err(winnow::error::ErrMode::Incomplete(_))` if there's not enough input data. |
280 | | /// |
281 | | /// # Effective Signature |
282 | | /// |
283 | | /// Assuming you are parsing a `&str` [Stream]: |
284 | | /// ```rust |
285 | | /// # use winnow::prelude::*;; |
286 | | /// # use winnow::stream::ContainsToken; |
287 | | /// # use winnow::error::ContextError; |
288 | | /// pub fn none_of<'i>(set: impl ContainsToken<char>) -> impl Parser<&'i str, char, ContextError> |
289 | | /// # { |
290 | | /// # winnow::token::none_of(set) |
291 | | /// # } |
292 | | /// ``` |
293 | | /// |
294 | | /// # Example |
295 | | /// |
296 | | /// ```rust |
297 | | /// # use winnow::{error::ErrMode, error::ContextError}; |
298 | | /// # use winnow::prelude::*; |
299 | | /// # use winnow::token::none_of; |
300 | | /// assert_eq!(none_of::<_, _, ContextError>(['a', 'b', 'c']).parse_peek("z"), Ok(("", 'z'))); |
301 | | /// assert!(none_of::<_, _, ContextError>(['a', 'b']).parse_peek("a").is_err()); |
302 | | /// assert!(none_of::<_, _, ContextError>('a').parse_peek("").is_err()); |
303 | | /// ``` |
304 | | /// |
305 | | /// ```rust |
306 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
307 | | /// # use winnow::prelude::*; |
308 | | /// # use winnow::Partial; |
309 | | /// # use winnow::token::none_of; |
310 | | /// assert_eq!(none_of::<_, _, ErrMode<ContextError>>(['a', 'b', 'c']).parse_peek(Partial::new("z")), Ok((Partial::new(""), 'z'))); |
311 | | /// assert!(none_of::<_, _, ErrMode<ContextError>>(['a', 'b']).parse_peek(Partial::new("a")).is_err()); |
312 | | /// assert_eq!(none_of::<_, _, ErrMode<ContextError>>('a').parse_peek(Partial::new("")), Err(ErrMode::Incomplete(Needed::new(1)))); |
313 | | /// ``` |
314 | | #[inline(always)] |
315 | | pub fn none_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> |
316 | | where |
317 | | Input: StreamIsPartial + Stream, |
318 | | <Input as Stream>::Token: Clone, |
319 | | Set: ContainsToken<<Input as Stream>::Token>, |
320 | | Error: ParserError<Input>, |
321 | | { |
322 | | trace( |
323 | | "none_of", |
324 | | any.verify(move |t: &<Input as Stream>::Token| !set.contains_token(t.clone())), |
325 | | ) |
326 | | } |
327 | | |
328 | | /// Recognize the longest (m <= len <= n) input slice that matches a [set of tokens][ContainsToken] |
329 | | /// |
330 | | /// It will return an `ErrMode::Backtrack(_)` if the set of tokens wasn't met or is out |
331 | | /// of range (m <= len <= n). |
332 | | /// |
333 | | /// *[Partial version][crate::_topic::partial]* will return a `ErrMode::Incomplete(Needed::new(1))` if a member of the set of tokens reaches the end of the input or is too short. |
334 | | /// |
335 | | /// To take a series of tokens, use [`repeat`][crate::combinator::repeat] to [`Accumulate`][crate::stream::Accumulate] into a `()` and then [`Parser::take`]. |
336 | | /// |
337 | | /// # Effective Signature |
338 | | /// |
339 | | /// Assuming you are parsing a `&str` [Stream] with `0..` or `1..` [ranges][Range]: |
340 | | /// ```rust |
341 | | /// # use std::ops::RangeFrom; |
342 | | /// # use winnow::prelude::*; |
343 | | /// # use winnow::stream::ContainsToken; |
344 | | /// # use winnow::error::ContextError; |
345 | | /// pub fn take_while<'i>(occurrences: RangeFrom<usize>, set: impl ContainsToken<char>) -> impl Parser<&'i str, &'i str, ContextError> |
346 | | /// # { |
347 | | /// # winnow::token::take_while(occurrences, set) |
348 | | /// # } |
349 | | /// ``` |
350 | | /// |
351 | | /// # Example |
352 | | /// |
353 | | /// Zero or more tokens: |
354 | | /// ```rust |
355 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
356 | | /// # use winnow::prelude::*; |
357 | | /// use winnow::token::take_while; |
358 | | /// use winnow::stream::AsChar; |
359 | | /// |
360 | | /// fn alpha<'i>(s: &mut &'i [u8]) -> ModalResult<&'i [u8]> { |
361 | | /// take_while(0.., AsChar::is_alpha).parse_next(s) |
362 | | /// } |
363 | | /// |
364 | | /// assert_eq!(alpha.parse_peek(b"latin123"), Ok((&b"123"[..], &b"latin"[..]))); |
365 | | /// assert_eq!(alpha.parse_peek(b"12345"), Ok((&b"12345"[..], &b""[..]))); |
366 | | /// assert_eq!(alpha.parse_peek(b"latin"), Ok((&b""[..], &b"latin"[..]))); |
367 | | /// assert_eq!(alpha.parse_peek(b""), Ok((&b""[..], &b""[..]))); |
368 | | /// ``` |
369 | | /// |
370 | | /// ```rust |
371 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
372 | | /// # use winnow::prelude::*; |
373 | | /// # use winnow::Partial; |
374 | | /// use winnow::token::take_while; |
375 | | /// use winnow::stream::AsChar; |
376 | | /// |
377 | | /// fn alpha<'i>(s: &mut Partial<&'i [u8]>) -> ModalResult<&'i [u8]> { |
378 | | /// take_while(0.., AsChar::is_alpha).parse_next(s) |
379 | | /// } |
380 | | /// |
381 | | /// assert_eq!(alpha.parse_peek(Partial::new(b"latin123")), Ok((Partial::new(&b"123"[..]), &b"latin"[..]))); |
382 | | /// assert_eq!(alpha.parse_peek(Partial::new(b"12345")), Ok((Partial::new(&b"12345"[..]), &b""[..]))); |
383 | | /// assert_eq!(alpha.parse_peek(Partial::new(b"latin")), Err(ErrMode::Incomplete(Needed::new(1)))); |
384 | | /// assert_eq!(alpha.parse_peek(Partial::new(b"")), Err(ErrMode::Incomplete(Needed::new(1)))); |
385 | | /// ``` |
386 | | /// |
387 | | /// One or more tokens: |
388 | | /// ```rust |
389 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
390 | | /// # use winnow::prelude::*; |
391 | | /// use winnow::token::take_while; |
392 | | /// use winnow::stream::AsChar; |
393 | | /// |
394 | | /// fn alpha<'i>(s: &mut &'i [u8]) -> ModalResult<&'i [u8]> { |
395 | | /// take_while(1.., AsChar::is_alpha).parse_next(s) |
396 | | /// } |
397 | | /// |
398 | | /// assert_eq!(alpha.parse_peek(b"latin123"), Ok((&b"123"[..], &b"latin"[..]))); |
399 | | /// assert_eq!(alpha.parse_peek(b"latin"), Ok((&b""[..], &b"latin"[..]))); |
400 | | /// assert!(alpha.parse_peek(b"12345").is_err()); |
401 | | /// |
402 | | /// fn hex<'i>(s: &mut &'i str) -> ModalResult<&'i str> { |
403 | | /// take_while(1.., ('0'..='9', 'A'..='F')).parse_next(s) |
404 | | /// } |
405 | | /// |
406 | | /// assert_eq!(hex.parse_peek("123 and voila"), Ok((" and voila", "123"))); |
407 | | /// assert_eq!(hex.parse_peek("DEADBEEF and others"), Ok((" and others", "DEADBEEF"))); |
408 | | /// assert_eq!(hex.parse_peek("BADBABEsomething"), Ok(("something", "BADBABE"))); |
409 | | /// assert_eq!(hex.parse_peek("D15EA5E"), Ok(("", "D15EA5E"))); |
410 | | /// assert!(hex.parse_peek("").is_err()); |
411 | | /// ``` |
412 | | /// |
413 | | /// ```rust |
414 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
415 | | /// # use winnow::prelude::*; |
416 | | /// # use winnow::Partial; |
417 | | /// use winnow::token::take_while; |
418 | | /// use winnow::stream::AsChar; |
419 | | /// |
420 | | /// fn alpha<'i>(s: &mut Partial<&'i [u8]>) -> ModalResult<&'i [u8]> { |
421 | | /// take_while(1.., AsChar::is_alpha).parse_next(s) |
422 | | /// } |
423 | | /// |
424 | | /// assert_eq!(alpha.parse_peek(Partial::new(b"latin123")), Ok((Partial::new(&b"123"[..]), &b"latin"[..]))); |
425 | | /// assert_eq!(alpha.parse_peek(Partial::new(b"latin")), Err(ErrMode::Incomplete(Needed::new(1)))); |
426 | | /// assert!(alpha.parse_peek(Partial::new(b"12345")).is_err()); |
427 | | /// |
428 | | /// fn hex<'i>(s: &mut Partial<&'i str>) -> ModalResult<&'i str> { |
429 | | /// take_while(1.., ('0'..='9', 'A'..='F')).parse_next(s) |
430 | | /// } |
431 | | /// |
432 | | /// assert_eq!(hex.parse_peek(Partial::new("123 and voila")), Ok((Partial::new(" and voila"), "123"))); |
433 | | /// assert_eq!(hex.parse_peek(Partial::new("DEADBEEF and others")), Ok((Partial::new(" and others"), "DEADBEEF"))); |
434 | | /// assert_eq!(hex.parse_peek(Partial::new("BADBABEsomething")), Ok((Partial::new("something"), "BADBABE"))); |
435 | | /// assert_eq!(hex.parse_peek(Partial::new("D15EA5E")), Err(ErrMode::Incomplete(Needed::new(1)))); |
436 | | /// assert_eq!(hex.parse_peek(Partial::new("")), Err(ErrMode::Incomplete(Needed::new(1)))); |
437 | | /// ``` |
438 | | /// |
439 | | /// Arbitrary amount of tokens: |
440 | | /// ```rust |
441 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
442 | | /// # use winnow::prelude::*; |
443 | | /// use winnow::token::take_while; |
444 | | /// use winnow::stream::AsChar; |
445 | | /// |
446 | | /// fn short_alpha<'i>(s: &mut &'i [u8]) -> ModalResult<&'i [u8]> { |
447 | | /// take_while(3..=6, AsChar::is_alpha).parse_next(s) |
448 | | /// } |
449 | | /// |
450 | | /// assert_eq!(short_alpha.parse_peek(b"latin123"), Ok((&b"123"[..], &b"latin"[..]))); |
451 | | /// assert_eq!(short_alpha.parse_peek(b"lengthy"), Ok((&b"y"[..], &b"length"[..]))); |
452 | | /// assert_eq!(short_alpha.parse_peek(b"latin"), Ok((&b""[..], &b"latin"[..]))); |
453 | | /// assert!(short_alpha.parse_peek(b"ed").is_err()); |
454 | | /// assert!(short_alpha.parse_peek(b"12345").is_err()); |
455 | | /// ``` |
456 | | /// |
457 | | /// ```rust |
458 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
459 | | /// # use winnow::prelude::*; |
460 | | /// # use winnow::Partial; |
461 | | /// use winnow::token::take_while; |
462 | | /// use winnow::stream::AsChar; |
463 | | /// |
464 | | /// fn short_alpha<'i>(s: &mut Partial<&'i [u8]>) -> ModalResult<&'i [u8]> { |
465 | | /// take_while(3..=6, AsChar::is_alpha).parse_next(s) |
466 | | /// } |
467 | | /// |
468 | | /// assert_eq!(short_alpha.parse_peek(Partial::new(b"latin123")), Ok((Partial::new(&b"123"[..]), &b"latin"[..]))); |
469 | | /// assert_eq!(short_alpha.parse_peek(Partial::new(b"lengthy")), Ok((Partial::new(&b"y"[..]), &b"length"[..]))); |
470 | | /// assert_eq!(short_alpha.parse_peek(Partial::new(b"latin")), Err(ErrMode::Incomplete(Needed::new(1)))); |
471 | | /// assert_eq!(short_alpha.parse_peek(Partial::new(b"ed")), Err(ErrMode::Incomplete(Needed::new(1)))); |
472 | | /// assert!(short_alpha.parse_peek(Partial::new(b"12345")).is_err()); |
473 | | /// ``` |
474 | | #[inline(always)] |
475 | | #[doc(alias = "is_a")] |
476 | | #[doc(alias = "take_while0")] |
477 | | #[doc(alias = "take_while1")] |
478 | 241M | pub fn take_while<Set, Input, Error>( |
479 | 241M | occurrences: impl Into<Range>, |
480 | 241M | set: Set, |
481 | 241M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> |
482 | 241M | where |
483 | 241M | Input: StreamIsPartial + Stream, |
484 | 241M | Set: ContainsToken<<Input as Stream>::Token>, |
485 | 241M | Error: ParserError<Input>, |
486 | | { |
487 | | let Range { |
488 | 241M | start_inclusive, |
489 | 241M | end_inclusive, |
490 | 241M | } = occurrences.into(); |
491 | 241M | trace("take_while", move |i: &mut Input| { |
492 | 197M | match (start_inclusive, end_inclusive) { |
493 | | (0, None) => { |
494 | 48.5M | if <Input as StreamIsPartial>::is_partial_supported() { |
495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0} |
496 | | } else { |
497 | 333M | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) winnow::token::take_while::<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Line | Count | Source | 497 | 121M | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) |
winnow::token::take_while::<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Line | Count | Source | 497 | 37.1M | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Line | Count | Source | 497 | 23.7k | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Line | Count | Source | 497 | 169M | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) |
winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Line | Count | Source | 497 | 980k | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) |
winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Line | Count | Source | 497 | 4.70M | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1} |
498 | | } |
499 | | } |
500 | | (1, None) => { |
501 | 143M | if <Input as StreamIsPartial>::is_partial_supported() { |
502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2} |
503 | | } else { |
504 | 408M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}winnow::token::take_while::<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Line | Count | Source | 504 | 125M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) |
winnow::token::take_while::<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Line | Count | Source | 504 | 114M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) |
winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Line | Count | Source | 504 | 161M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Line | Count | Source | 504 | 2.21M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) |
winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Line | Count | Source | 504 | 2.21M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Line | Count | Source | 504 | 3.08M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3} |
505 | | } |
506 | | } |
507 | 4.97M | (start, end) => { |
508 | 4.97M | let end = end.unwrap_or(usize::MAX); |
509 | 4.97M | if <Input as StreamIsPartial>::is_partial_supported() { |
510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4} |
511 | | } else { |
512 | 79.5M | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}Line | Count | Source | 512 | 741k | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}Line | Count | Source | 512 | 78.7M | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5} |
513 | | } |
514 | | } |
515 | | } |
516 | 197M | }) winnow::token::take_while::<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 20.0M | trace("take_while", move |i: &mut Input| { | 492 | 20.0M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 20.0M | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 20.0M | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 0 | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 20.0M | }) |
winnow::token::take_while::<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 26.7M | trace("take_while", move |i: &mut Input| { | 492 | 26.7M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 26.7M | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 26.7M | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 0 | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 26.7M | }) |
winnow::token::take_while::<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 23.2M | trace("take_while", move |i: &mut Input| { | 492 | 23.2M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 0 | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 23.2M | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 23.2M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 23.2M | }) |
winnow::token::take_while::<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 7.26M | trace("take_while", move |i: &mut Input| { | 492 | 7.26M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 0 | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 7.26M | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 7.26M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 7.26M | }) |
winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 113M | trace("take_while", move |i: &mut Input| { | 492 | 113M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 0 | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 113M | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 113M | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 113M | }) |
Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 5.68k | trace("take_while", move |i: &mut Input| { | 492 | 5.68k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 5.68k | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 5.68k | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 0 | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 5.68k | }) |
winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 1.63k | trace("take_while", move |i: &mut Input| { | 492 | 1.63k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 0 | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 1.63k | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 1.63k | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 1.63k | }) |
winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 1.63k | trace("take_while", move |i: &mut Input| { | 492 | 1.63k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 0 | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 1.63k | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 1.63k | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 1.63k | }) |
winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}Line | Count | Source | 491 | 18.4k | trace("take_while", move |i: &mut Input| { | 492 | 18.4k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 0 | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 0 | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 18.4k | (start, end) => { | 508 | 18.4k | let end = end.unwrap_or(usize::MAX); | 509 | 18.4k | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 18.4k | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 18.4k | }) |
winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 3.85k | trace("take_while", move |i: &mut Input| { | 492 | 3.85k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 0 | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 3.85k | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 3.85k | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 3.85k | }) |
winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 1.62M | trace("take_while", move |i: &mut Input| { | 492 | 1.62M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 1.62M | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 1.62M | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 0 | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 1.62M | }) |
winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 82.5k | trace("take_while", move |i: &mut Input| { | 492 | 82.5k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 82.5k | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 82.5k | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 0 | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 82.5k | }) |
winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 491 | 17.9k | trace("take_while", move |i: &mut Input| { | 492 | 17.9k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 17.9k | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 17.9k | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 0 | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 0 | (start, end) => { | 508 | 0 | let end = end.unwrap_or(usize::MAX); | 509 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 17.9k | }) |
Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}Line | Count | Source | 491 | 4.95M | trace("take_while", move |i: &mut Input| { | 492 | 4.95M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 0 | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 0 | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | 4.95M | (start, end) => { | 508 | 4.95M | let end = end.unwrap_or(usize::MAX); | 509 | 4.95M | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | 4.95M | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 4.95M | }) |
Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0} |
517 | 241M | } winnow::token::take_while::<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>Line | Count | Source | 478 | 20.0M | pub fn take_while<Set, Input, Error>( | 479 | 20.0M | occurrences: impl Into<Range>, | 480 | 20.0M | set: Set, | 481 | 20.0M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 20.0M | where | 483 | 20.0M | Input: StreamIsPartial + Stream, | 484 | 20.0M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 20.0M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 20.0M | start_inclusive, | 489 | 20.0M | end_inclusive, | 490 | 20.0M | } = occurrences.into(); | 491 | 20.0M | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 20.0M | } |
winnow::token::take_while::<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>Line | Count | Source | 478 | 71.0M | pub fn take_while<Set, Input, Error>( | 479 | 71.0M | occurrences: impl Into<Range>, | 480 | 71.0M | set: Set, | 481 | 71.0M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 71.0M | where | 483 | 71.0M | Input: StreamIsPartial + Stream, | 484 | 71.0M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 71.0M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 71.0M | start_inclusive, | 489 | 71.0M | end_inclusive, | 490 | 71.0M | } = occurrences.into(); | 491 | 71.0M | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 71.0M | } |
winnow::token::take_while::<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>> Line | Count | Source | 478 | 23.2M | pub fn take_while<Set, Input, Error>( | 479 | 23.2M | occurrences: impl Into<Range>, | 480 | 23.2M | set: Set, | 481 | 23.2M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 23.2M | where | 483 | 23.2M | Input: StreamIsPartial + Stream, | 484 | 23.2M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 23.2M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 23.2M | start_inclusive, | 489 | 23.2M | end_inclusive, | 490 | 23.2M | } = occurrences.into(); | 491 | 23.2M | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 23.2M | } |
winnow::token::take_while::<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>> Line | Count | Source | 478 | 7.26M | pub fn take_while<Set, Input, Error>( | 479 | 7.26M | occurrences: impl Into<Range>, | 480 | 7.26M | set: Set, | 481 | 7.26M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 7.26M | where | 483 | 7.26M | Input: StreamIsPartial + Stream, | 484 | 7.26M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 7.26M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 7.26M | start_inclusive, | 489 | 7.26M | end_inclusive, | 490 | 7.26M | } = occurrences.into(); | 491 | 7.26M | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 7.26M | } |
winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>> Line | Count | Source | 478 | 113M | pub fn take_while<Set, Input, Error>( | 479 | 113M | occurrences: impl Into<Range>, | 480 | 113M | set: Set, | 481 | 113M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 113M | where | 483 | 113M | Input: StreamIsPartial + Stream, | 484 | 113M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 113M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 113M | start_inclusive, | 489 | 113M | end_inclusive, | 490 | 113M | } = occurrences.into(); | 491 | 113M | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 113M | } |
Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>> Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>> Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>> Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>> Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Line | Count | Source | 478 | 7.49k | pub fn take_while<Set, Input, Error>( | 479 | 7.49k | occurrences: impl Into<Range>, | 480 | 7.49k | set: Set, | 481 | 7.49k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 7.49k | where | 483 | 7.49k | Input: StreamIsPartial + Stream, | 484 | 7.49k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 7.49k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 7.49k | start_inclusive, | 489 | 7.49k | end_inclusive, | 490 | 7.49k | } = occurrences.into(); | 491 | 7.49k | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 7.49k | } |
winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Line | Count | Source | 478 | 1.68k | pub fn take_while<Set, Input, Error>( | 479 | 1.68k | occurrences: impl Into<Range>, | 480 | 1.68k | set: Set, | 481 | 1.68k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 1.68k | where | 483 | 1.68k | Input: StreamIsPartial + Stream, | 484 | 1.68k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 1.68k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 1.68k | start_inclusive, | 489 | 1.68k | end_inclusive, | 490 | 1.68k | } = occurrences.into(); | 491 | 1.68k | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 1.68k | } |
winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Line | Count | Source | 478 | 1.68k | pub fn take_while<Set, Input, Error>( | 479 | 1.68k | occurrences: impl Into<Range>, | 480 | 1.68k | set: Set, | 481 | 1.68k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 1.68k | where | 483 | 1.68k | Input: StreamIsPartial + Stream, | 484 | 1.68k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 1.68k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 1.68k | start_inclusive, | 489 | 1.68k | end_inclusive, | 490 | 1.68k | } = occurrences.into(); | 491 | 1.68k | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 1.68k | } |
winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>> Line | Count | Source | 478 | 18.4k | pub fn take_while<Set, Input, Error>( | 479 | 18.4k | occurrences: impl Into<Range>, | 480 | 18.4k | set: Set, | 481 | 18.4k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 18.4k | where | 483 | 18.4k | Input: StreamIsPartial + Stream, | 484 | 18.4k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 18.4k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 18.4k | start_inclusive, | 489 | 18.4k | end_inclusive, | 490 | 18.4k | } = occurrences.into(); | 491 | 18.4k | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 18.4k | } |
winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Line | Count | Source | 478 | 3.97k | pub fn take_while<Set, Input, Error>( | 479 | 3.97k | occurrences: impl Into<Range>, | 480 | 3.97k | set: Set, | 481 | 3.97k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 3.97k | where | 483 | 3.97k | Input: StreamIsPartial + Stream, | 484 | 3.97k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 3.97k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 3.97k | start_inclusive, | 489 | 3.97k | end_inclusive, | 490 | 3.97k | } = occurrences.into(); | 491 | 3.97k | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 3.97k | } |
winnow::token::take_while::<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Line | Count | Source | 478 | 1.62M | pub fn take_while<Set, Input, Error>( | 479 | 1.62M | occurrences: impl Into<Range>, | 480 | 1.62M | set: Set, | 481 | 1.62M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 1.62M | where | 483 | 1.62M | Input: StreamIsPartial + Stream, | 484 | 1.62M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 1.62M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 1.62M | start_inclusive, | 489 | 1.62M | end_inclusive, | 490 | 1.62M | } = occurrences.into(); | 491 | 1.62M | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 1.62M | } |
winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Line | Count | Source | 478 | 87.7k | pub fn take_while<Set, Input, Error>( | 479 | 87.7k | occurrences: impl Into<Range>, | 480 | 87.7k | set: Set, | 481 | 87.7k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 87.7k | where | 483 | 87.7k | Input: StreamIsPartial + Stream, | 484 | 87.7k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 87.7k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 87.7k | start_inclusive, | 489 | 87.7k | end_inclusive, | 490 | 87.7k | } = occurrences.into(); | 491 | 87.7k | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 87.7k | } |
winnow::token::take_while::<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Line | Count | Source | 478 | 17.9k | pub fn take_while<Set, Input, Error>( | 479 | 17.9k | occurrences: impl Into<Range>, | 480 | 17.9k | set: Set, | 481 | 17.9k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 17.9k | where | 483 | 17.9k | Input: StreamIsPartial + Stream, | 484 | 17.9k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 17.9k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 17.9k | start_inclusive, | 489 | 17.9k | end_inclusive, | 490 | 17.9k | } = occurrences.into(); | 491 | 17.9k | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 17.9k | } |
Unexecuted instantiation: winnow::token::take_while::<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>> winnow::token::take_while::<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>> Line | Count | Source | 478 | 4.95M | pub fn take_while<Set, Input, Error>( | 479 | 4.95M | occurrences: impl Into<Range>, | 480 | 4.95M | set: Set, | 481 | 4.95M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 4.95M | where | 483 | 4.95M | Input: StreamIsPartial + Stream, | 484 | 4.95M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 4.95M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 4.95M | start_inclusive, | 489 | 4.95M | end_inclusive, | 490 | 4.95M | } = occurrences.into(); | 491 | 4.95M | trace("take_while", move |i: &mut Input| { | 492 | | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) | 498 | | } | 499 | | } | 500 | | (1, None) => { | 501 | | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | | take_till1::<_, _, _, false>(i, |c| !set.contains_token(c)) | 505 | | } | 506 | | } | 507 | | (start, end) => { | 508 | | let end = end.unwrap_or(usize::MAX); | 509 | | if <Input as StreamIsPartial>::is_partial_supported() { | 510 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| !set.contains_token(c)) | 511 | | } else { | 512 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | | }) | 517 | 4.95M | } |
Unexecuted instantiation: winnow::token::take_while::<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>> Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>> Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>> Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Unexecuted instantiation: winnow::token::take_while::<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>> Unexecuted instantiation: winnow::token::take_while::<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> |
518 | | |
519 | 75.1M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( |
520 | 75.1M | input: &mut I, |
521 | 75.1M | predicate: P, |
522 | 75.1M | ) -> Result<<I as Stream>::Slice, E> |
523 | 75.1M | where |
524 | 75.1M | P: Fn(I::Token) -> bool, |
525 | | { |
526 | 75.1M | let offset = match input.offset_for(predicate) { |
527 | 75.0M | Some(offset) => offset, |
528 | 94.6k | None if PARTIAL && input.is_partial() => { |
529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); |
530 | | } |
531 | 94.6k | None => input.eof_offset(), |
532 | | }; |
533 | 75.1M | Ok(input.next_slice(offset)) |
534 | 75.1M | } Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>winnow::token::take_till0::<winnow::token::take_while<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Line | Count | Source | 519 | 20.0M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 20.0M | input: &mut I, | 521 | 20.0M | predicate: P, | 522 | 20.0M | ) -> Result<<I as Stream>::Slice, E> | 523 | 20.0M | where | 524 | 20.0M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 20.0M | let offset = match input.offset_for(predicate) { | 527 | 20.0M | Some(offset) => offset, | 528 | 2.14k | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 2.14k | None => input.eof_offset(), | 532 | | }; | 533 | 20.0M | Ok(input.next_slice(offset)) | 534 | 20.0M | } |
Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>winnow::token::take_till0::<winnow::token::take_while<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Line | Count | Source | 519 | 26.7M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 26.7M | input: &mut I, | 521 | 26.7M | predicate: P, | 522 | 26.7M | ) -> Result<<I as Stream>::Slice, E> | 523 | 26.7M | where | 524 | 26.7M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 26.7M | let offset = match input.offset_for(predicate) { | 527 | 26.7M | Some(offset) => offset, | 528 | 1.02k | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 1.02k | None => input.eof_offset(), | 532 | | }; | 533 | 26.7M | Ok(input.next_slice(offset)) | 534 | 26.7M | } |
Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>winnow::token::take_till0::<winnow::token::take_till<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Line | Count | Source | 519 | 21.5M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 21.5M | input: &mut I, | 521 | 21.5M | predicate: P, | 522 | 21.5M | ) -> Result<<I as Stream>::Slice, E> | 523 | 21.5M | where | 524 | 21.5M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 21.5M | let offset = match input.offset_for(predicate) { | 527 | 21.5M | Some(offset) => offset, | 528 | 1.05k | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 1.05k | None => input.eof_offset(), | 532 | | }; | 533 | 21.5M | Ok(input.next_slice(offset)) | 534 | 21.5M | } |
Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 519 | 5.68k | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 5.68k | input: &mut I, | 521 | 5.68k | predicate: P, | 522 | 5.68k | ) -> Result<<I as Stream>::Slice, E> | 523 | 5.68k | where | 524 | 5.68k | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 5.68k | let offset = match input.offset_for(predicate) { | 527 | 4.87k | Some(offset) => offset, | 528 | 814 | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 814 | None => input.eof_offset(), | 532 | | }; | 533 | 5.68k | Ok(input.next_slice(offset)) | 534 | 5.68k | } |
Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 519 | 5.01M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 5.01M | input: &mut I, | 521 | 5.01M | predicate: P, | 522 | 5.01M | ) -> Result<<I as Stream>::Slice, E> | 523 | 5.01M | where | 524 | 5.01M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 5.01M | let offset = match input.offset_for(predicate) { | 527 | 5.01M | Some(offset) => offset, | 528 | 214 | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 214 | None => input.eof_offset(), | 532 | | }; | 533 | 5.01M | Ok(input.next_slice(offset)) | 534 | 5.01M | } |
Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 519 | 1.62M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 1.62M | input: &mut I, | 521 | 1.62M | predicate: P, | 522 | 1.62M | ) -> Result<<I as Stream>::Slice, E> | 523 | 1.62M | where | 524 | 1.62M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 1.62M | let offset = match input.offset_for(predicate) { | 527 | 1.62M | Some(offset) => offset, | 528 | 15 | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 15 | None => input.eof_offset(), | 532 | | }; | 533 | 1.62M | Ok(input.next_slice(offset)) | 534 | 1.62M | } |
Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 519 | 82.5k | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 82.5k | input: &mut I, | 521 | 82.5k | predicate: P, | 522 | 82.5k | ) -> Result<<I as Stream>::Slice, E> | 523 | 82.5k | where | 524 | 82.5k | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 82.5k | let offset = match input.offset_for(predicate) { | 527 | 10.3k | Some(offset) => offset, | 528 | 72.2k | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 72.2k | None => input.eof_offset(), | 532 | | }; | 533 | 82.5k | Ok(input.next_slice(offset)) | 534 | 82.5k | } |
Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 519 | 17.9k | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 17.9k | input: &mut I, | 521 | 17.9k | predicate: P, | 522 | 17.9k | ) -> Result<<I as Stream>::Slice, E> | 523 | 17.9k | where | 524 | 17.9k | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 17.9k | let offset = match input.offset_for(predicate) { | 527 | 820 | Some(offset) => offset, | 528 | 17.1k | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 17.1k | None => input.eof_offset(), | 532 | | }; | 533 | 17.9k | Ok(input.next_slice(offset)) | 534 | 17.9k | } |
Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till0::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}, &[u8], winnow::error::ErrMode<()>, false> |
535 | | |
536 | 149M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( |
537 | 149M | input: &mut I, |
538 | 149M | predicate: P, |
539 | 149M | ) -> Result<<I as Stream>::Slice, E> |
540 | 149M | where |
541 | 149M | P: Fn(I::Token) -> bool, |
542 | | { |
543 | 149M | let offset = match input.offset_for(predicate) { |
544 | 148M | Some(offset) => offset, |
545 | 26.9k | None if PARTIAL && input.is_partial() => { |
546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); |
547 | | } |
548 | 26.9k | None => input.eof_offset(), |
549 | | }; |
550 | 149M | if offset == 0 { |
551 | 91.9M | Err(ParserError::from_input(input)) |
552 | | } else { |
553 | 57.0M | Ok(input.next_slice(offset)) |
554 | | } |
555 | 149M | } Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>winnow::token::take_till1::<winnow::token::take_while<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Line | Count | Source | 536 | 23.2M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 23.2M | input: &mut I, | 538 | 23.2M | predicate: P, | 539 | 23.2M | ) -> Result<<I as Stream>::Slice, E> | 540 | 23.2M | where | 541 | 23.2M | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 23.2M | let offset = match input.offset_for(predicate) { | 544 | 23.2M | Some(offset) => offset, | 545 | 214 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 214 | None => input.eof_offset(), | 549 | | }; | 550 | 23.2M | if offset == 0 { | 551 | 245 | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 23.2M | Ok(input.next_slice(offset)) | 554 | | } | 555 | 23.2M | } |
Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>winnow::token::take_till1::<winnow::token::take_while<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Line | Count | Source | 536 | 7.26M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 7.26M | input: &mut I, | 538 | 7.26M | predicate: P, | 539 | 7.26M | ) -> Result<<I as Stream>::Slice, E> | 540 | 7.26M | where | 541 | 7.26M | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 7.26M | let offset = match input.offset_for(predicate) { | 544 | 7.26M | Some(offset) => offset, | 545 | 470 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 470 | None => input.eof_offset(), | 549 | | }; | 550 | 7.26M | if offset == 0 { | 551 | 4.69M | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 2.56M | Ok(input.next_slice(offset)) | 554 | | } | 555 | 7.26M | } |
Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Line | Count | Source | 536 | 113M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 113M | input: &mut I, | 538 | 113M | predicate: P, | 539 | 113M | ) -> Result<<I as Stream>::Slice, E> | 540 | 113M | where | 541 | 113M | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 113M | let offset = match input.offset_for(predicate) { | 544 | 113M | Some(offset) => offset, | 545 | 25.0k | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 25.0k | None => input.eof_offset(), | 549 | | }; | 550 | 113M | if offset == 0 { | 551 | 87.2M | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 26.2M | Ok(input.next_slice(offset)) | 554 | | } | 555 | 113M | } |
Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 536 | 1.63k | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 1.63k | input: &mut I, | 538 | 1.63k | predicate: P, | 539 | 1.63k | ) -> Result<<I as Stream>::Slice, E> | 540 | 1.63k | where | 541 | 1.63k | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 1.63k | let offset = match input.offset_for(predicate) { | 544 | 1.59k | Some(offset) => offset, | 545 | 33 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 33 | None => input.eof_offset(), | 549 | | }; | 550 | 1.63k | if offset == 0 { | 551 | 3 | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 1.62k | Ok(input.next_slice(offset)) | 554 | | } | 555 | 1.63k | } |
Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 536 | 1.63k | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 1.63k | input: &mut I, | 538 | 1.63k | predicate: P, | 539 | 1.63k | ) -> Result<<I as Stream>::Slice, E> | 540 | 1.63k | where | 541 | 1.63k | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 1.63k | let offset = match input.offset_for(predicate) { | 544 | 1.59k | Some(offset) => offset, | 545 | 33 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 33 | None => input.eof_offset(), | 549 | | }; | 550 | 1.63k | if offset == 0 { | 551 | 3 | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 1.62k | Ok(input.next_slice(offset)) | 554 | | } | 555 | 1.63k | } |
Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 536 | 3.85k | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 3.85k | input: &mut I, | 538 | 3.85k | predicate: P, | 539 | 3.85k | ) -> Result<<I as Stream>::Slice, E> | 540 | 3.85k | where | 541 | 3.85k | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 3.85k | let offset = match input.offset_for(predicate) { | 544 | 3.80k | Some(offset) => offset, | 545 | 48 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 48 | None => input.eof_offset(), | 549 | | }; | 550 | 3.85k | if offset == 0 { | 551 | 36 | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 3.81k | Ok(input.next_slice(offset)) | 554 | | } | 555 | 3.85k | } |
Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 536 | 5.01M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 5.01M | input: &mut I, | 538 | 5.01M | predicate: P, | 539 | 5.01M | ) -> Result<<I as Stream>::Slice, E> | 540 | 5.01M | where | 541 | 5.01M | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 5.01M | let offset = match input.offset_for(predicate) { | 544 | 5.01M | Some(offset) => offset, | 545 | 1.06k | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 1.06k | None => input.eof_offset(), | 549 | | }; | 550 | 5.01M | if offset == 0 { | 551 | 1.75k | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 5.01M | Ok(input.next_slice(offset)) | 554 | | } | 555 | 5.01M | } |
Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till1::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}, &[u8], winnow::error::ErrMode<()>, false> |
556 | | |
557 | 4.97M | fn take_till_m_n<P, I, Error: ParserError<I>, const PARTIAL: bool>( |
558 | 4.97M | input: &mut I, |
559 | 4.97M | m: usize, |
560 | 4.97M | n: usize, |
561 | 4.97M | predicate: P, |
562 | 4.97M | ) -> Result<<I as Stream>::Slice, Error> |
563 | 4.97M | where |
564 | 4.97M | I: StreamIsPartial, |
565 | 4.97M | I: Stream, |
566 | 4.97M | P: Fn(I::Token) -> bool, |
567 | | { |
568 | 4.97M | if n < m { |
569 | 0 | return Err(ParserError::assert( |
570 | 0 | input, |
571 | 0 | "`occurrences` should be ascending, rather than descending", |
572 | 0 | )); |
573 | 4.97M | } |
574 | | |
575 | 4.97M | let mut final_count = 0; |
576 | 79.5M | for (processed, (offset, token)) in input.iter_offsets().enumerate() { |
577 | 79.5M | if predicate(token) { |
578 | 2.10M | if processed < m { |
579 | 202k | return Err(ParserError::from_input(input)); |
580 | | } else { |
581 | 1.90M | return Ok(input.next_slice(offset)); |
582 | | } |
583 | | } else { |
584 | 77.4M | if processed == n { |
585 | 12.7k | return Ok(input.next_slice(offset)); |
586 | 77.3M | } |
587 | 77.3M | final_count = processed + 1; |
588 | | } |
589 | | } |
590 | 2.85M | if PARTIAL && input.is_partial() { |
591 | 0 | if final_count == n { |
592 | 0 | Ok(input.finish()) |
593 | | } else { |
594 | 0 | let needed = if m > input.eof_offset() { |
595 | 0 | m - input.eof_offset() |
596 | | } else { |
597 | 0 | 1 |
598 | | }; |
599 | 0 | Err(ParserError::incomplete(input, Needed::new(needed))) |
600 | | } |
601 | | } else { |
602 | 2.85M | if m <= final_count { |
603 | 533 | Ok(input.finish()) |
604 | | } else { |
605 | 2.85M | Err(ParserError::from_input(input)) |
606 | | } |
607 | | } |
608 | 4.97M | } Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_config::parse::nom::value_impl::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_config::parse::nom::config_name::{closure#1}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_config::parse::nom::is_section_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_config::parse::nom::is_subsection_unescaped_char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_space, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 557 | 18.4k | fn take_till_m_n<P, I, Error: ParserError<I>, const PARTIAL: bool>( | 558 | 18.4k | input: &mut I, | 559 | 18.4k | m: usize, | 560 | 18.4k | n: usize, | 561 | 18.4k | predicate: P, | 562 | 18.4k | ) -> Result<<I as Stream>::Slice, Error> | 563 | 18.4k | where | 564 | 18.4k | I: StreamIsPartial, | 565 | 18.4k | I: Stream, | 566 | 18.4k | P: Fn(I::Token) -> bool, | 567 | | { | 568 | 18.4k | if n < m { | 569 | 0 | return Err(ParserError::assert( | 570 | 0 | input, | 571 | 0 | "`occurrences` should be ascending, rather than descending", | 572 | 0 | )); | 573 | 18.4k | } | 574 | | | 575 | 18.4k | let mut final_count = 0; | 576 | 741k | for (processed, (offset, token)) in input.iter_offsets().enumerate() { | 577 | 741k | if predicate(token) { | 578 | 18.2k | if processed < m { | 579 | 322 | return Err(ParserError::from_input(input)); | 580 | | } else { | 581 | 17.8k | return Ok(input.next_slice(offset)); | 582 | | } | 583 | | } else { | 584 | 723k | if processed == n { | 585 | 92 | return Ok(input.next_slice(offset)); | 586 | 723k | } | 587 | 723k | final_count = processed + 1; | 588 | | } | 589 | | } | 590 | 176 | if PARTIAL && input.is_partial() { | 591 | 0 | if final_count == n { | 592 | 0 | Ok(input.finish()) | 593 | | } else { | 594 | 0 | let needed = if m > input.eof_offset() { | 595 | 0 | m - input.eof_offset() | 596 | | } else { | 597 | 0 | 1 | 598 | | }; | 599 | 0 | Err(ParserError::incomplete(input, Needed::new(needed))) | 600 | | } | 601 | | } else { | 602 | 176 | if m <= final_count { | 603 | 4 | Ok(input.finish()) | 604 | | } else { | 605 | 172 | Err(ParserError::from_input(input)) | 606 | | } | 607 | | } | 608 | 18.4k | } |
Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::packed::decode::until_newline<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::file::log::line::decode::message<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::store_impl::file::loose::reference::decode::parse::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>winnow::token::take_till_m_n::<winnow::token::take_while<gix_ref::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Line | Count | Source | 557 | 4.95M | fn take_till_m_n<P, I, Error: ParserError<I>, const PARTIAL: bool>( | 558 | 4.95M | input: &mut I, | 559 | 4.95M | m: usize, | 560 | 4.95M | n: usize, | 561 | 4.95M | predicate: P, | 562 | 4.95M | ) -> Result<<I as Stream>::Slice, Error> | 563 | 4.95M | where | 564 | 4.95M | I: StreamIsPartial, | 565 | 4.95M | I: Stream, | 566 | 4.95M | P: Fn(I::Token) -> bool, | 567 | | { | 568 | 4.95M | if n < m { | 569 | 0 | return Err(ParserError::assert( | 570 | 0 | input, | 571 | 0 | "`occurrences` should be ascending, rather than descending", | 572 | 0 | )); | 573 | 4.95M | } | 574 | | | 575 | 4.95M | let mut final_count = 0; | 576 | 78.7M | for (processed, (offset, token)) in input.iter_offsets().enumerate() { | 577 | 78.7M | if predicate(token) { | 578 | 2.09M | if processed < m { | 579 | 202k | return Err(ParserError::from_input(input)); | 580 | | } else { | 581 | 1.88M | return Ok(input.next_slice(offset)); | 582 | | } | 583 | | } else { | 584 | 76.6M | if processed == n { | 585 | 12.6k | return Ok(input.next_slice(offset)); | 586 | 76.6M | } | 587 | 76.6M | final_count = processed + 1; | 588 | | } | 589 | | } | 590 | 2.85M | if PARTIAL && input.is_partial() { | 591 | 0 | if final_count == n { | 592 | 0 | Ok(input.finish()) | 593 | | } else { | 594 | 0 | let needed = if m > input.eof_offset() { | 595 | 0 | m - input.eof_offset() | 596 | | } else { | 597 | 0 | 1 | 598 | | }; | 599 | 0 | Err(ParserError::incomplete(input, Needed::new(needed))) | 600 | | } | 601 | | } else { | 602 | 2.85M | if m <= final_count { | 603 | 529 | Ok(input.finish()) | 604 | | } else { | 605 | 2.85M | Err(ParserError::from_input(input)) | 606 | | } | 607 | | } | 608 | 4.95M | } |
Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<u8, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<winnow::error::ContextError>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::tag::decode::git_tag<()>::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<gix_object::TagRefIter>::next_inner_::{closure#3}::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_while<<u8 as winnow::stream::AsChar>::is_alpha, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], (), true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], (), false>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}, &[u8], winnow::error::ErrMode<()>, true>Unexecuted instantiation: winnow::token::take_till_m_n::<winnow::token::take_till<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}, &[u8], winnow::error::ErrMode<()>, false> |
609 | | |
610 | | /// Recognize the longest input slice (if any) till a member of a [set of tokens][ContainsToken] is found. |
611 | | /// |
612 | | /// It doesn't consume the terminating token from the set. |
613 | | /// |
614 | | /// *[Partial version][crate::_topic::partial]* will return a `ErrMode::Incomplete(Needed::new(1))` if the match reaches the |
615 | | /// end of input or if there was not match. |
616 | | /// |
617 | | /// See also |
618 | | /// - [`take_until`] for recognizing up-to a [`literal`] (w/ optional simd optimizations) |
619 | | /// - [`repeat_till`][crate::combinator::repeat_till] with [`Parser::take`] for taking tokens up to a [`Parser`] |
620 | | /// |
621 | | /// # Effective Signature |
622 | | /// |
623 | | /// Assuming you are parsing a `&str` [Stream] with `0..` or `1..` [ranges][Range]: |
624 | | /// ```rust |
625 | | /// # use std::ops::RangeFrom; |
626 | | /// # use winnow::prelude::*; |
627 | | /// # use winnow::stream::ContainsToken; |
628 | | /// # use winnow::error::ContextError; |
629 | | /// pub fn take_till<'i>(occurrences: RangeFrom<usize>, set: impl ContainsToken<char>) -> impl Parser<&'i str, &'i str, ContextError> |
630 | | /// # { |
631 | | /// # winnow::token::take_till(occurrences, set) |
632 | | /// # } |
633 | | /// ``` |
634 | | /// |
635 | | /// # Example |
636 | | /// |
637 | | /// ```rust |
638 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
639 | | /// # use winnow::prelude::*; |
640 | | /// use winnow::token::take_till; |
641 | | /// |
642 | | /// fn till_colon<'i>(s: &mut &'i str) -> ModalResult<&'i str> { |
643 | | /// take_till(0.., |c| c == ':').parse_next(s) |
644 | | /// } |
645 | | /// |
646 | | /// assert_eq!(till_colon.parse_peek("latin:123"), Ok((":123", "latin"))); |
647 | | /// assert_eq!(till_colon.parse_peek(":empty matched"), Ok((":empty matched", ""))); //allowed |
648 | | /// assert_eq!(till_colon.parse_peek("12345"), Ok(("", "12345"))); |
649 | | /// assert_eq!(till_colon.parse_peek(""), Ok(("", ""))); |
650 | | /// ``` |
651 | | /// |
652 | | /// ```rust |
653 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
654 | | /// # use winnow::prelude::*; |
655 | | /// # use winnow::Partial; |
656 | | /// use winnow::token::take_till; |
657 | | /// |
658 | | /// fn till_colon<'i>(s: &mut Partial<&'i str>) -> ModalResult<&'i str> { |
659 | | /// take_till(0.., |c| c == ':').parse_next(s) |
660 | | /// } |
661 | | /// |
662 | | /// assert_eq!(till_colon.parse_peek(Partial::new("latin:123")), Ok((Partial::new(":123"), "latin"))); |
663 | | /// assert_eq!(till_colon.parse_peek(Partial::new(":empty matched")), Ok((Partial::new(":empty matched"), ""))); //allowed |
664 | | /// assert_eq!(till_colon.parse_peek(Partial::new("12345")), Err(ErrMode::Incomplete(Needed::new(1)))); |
665 | | /// assert_eq!(till_colon.parse_peek(Partial::new("")), Err(ErrMode::Incomplete(Needed::new(1)))); |
666 | | /// ``` |
667 | | #[inline(always)] |
668 | | #[doc(alias = "is_not")] |
669 | 107M | pub fn take_till<Set, Input, Error>( |
670 | 107M | occurrences: impl Into<Range>, |
671 | 107M | set: Set, |
672 | 107M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> |
673 | 107M | where |
674 | 107M | Input: StreamIsPartial + Stream, |
675 | 107M | Set: ContainsToken<<Input as Stream>::Token>, |
676 | 107M | Error: ParserError<Input>, |
677 | | { |
678 | | let Range { |
679 | 107M | start_inclusive, |
680 | 107M | end_inclusive, |
681 | 107M | } = occurrences.into(); |
682 | 107M | trace("take_till", move |i: &mut Input| { |
683 | 31.6M | match (start_inclusive, end_inclusive) { |
684 | | (0, None) => { |
685 | 26.5M | if <Input as StreamIsPartial>::is_partial_supported() { |
686 | 0 | take_till0::<_, _, _, true>(i, |c| set.contains_token(c)) Unexecuted instantiation: winnow::token::take_till::<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#0} |
687 | | } else { |
688 | 122M | take_till0::<_, _, _, false>(i, |c| set.contains_token(c)) winnow::token::take_till::<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Line | Count | Source | 688 | 83.5M | take_till0::<_, _, _, false>(i, |c| set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Line | Count | Source | 688 | 38.8M | take_till0::<_, _, _, false>(i, |c| set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1} |
689 | | } |
690 | | } |
691 | | (1, None) => { |
692 | 5.01M | if <Input as StreamIsPartial>::is_partial_supported() { |
693 | 0 | take_till1::<_, _, _, true>(i, |c| set.contains_token(c)) Unexecuted instantiation: winnow::token::take_till::<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#2} |
694 | | } else { |
695 | 17.9M | take_till1::<_, _, _, false>(i, |c| set.contains_token(c)) Unexecuted instantiation: winnow::token::take_till::<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Line | Count | Source | 695 | 17.9M | take_till1::<_, _, _, false>(i, |c| set.contains_token(c)) |
Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#3} |
696 | | } |
697 | | } |
698 | 0 | (start, end) => { |
699 | 0 | let end = end.unwrap_or(usize::MAX); |
700 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { |
701 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| set.contains_token(c)) Unexecuted instantiation: winnow::token::take_till::<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#4} |
702 | | } else { |
703 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| set.contains_token(c)) Unexecuted instantiation: winnow::token::take_till::<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#5} |
704 | | } |
705 | | } |
706 | | } |
707 | 31.6M | }) winnow::token::take_till::<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 682 | 21.5M | trace("take_till", move |i: &mut Input| { | 683 | 21.5M | match (start_inclusive, end_inclusive) { | 684 | | (0, None) => { | 685 | 21.5M | if <Input as StreamIsPartial>::is_partial_supported() { | 686 | 0 | take_till0::<_, _, _, true>(i, |c| set.contains_token(c)) | 687 | | } else { | 688 | 21.5M | take_till0::<_, _, _, false>(i, |c| set.contains_token(c)) | 689 | | } | 690 | | } | 691 | | (1, None) => { | 692 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 693 | 0 | take_till1::<_, _, _, true>(i, |c| set.contains_token(c)) | 694 | | } else { | 695 | 0 | take_till1::<_, _, _, false>(i, |c| set.contains_token(c)) | 696 | | } | 697 | | } | 698 | 0 | (start, end) => { | 699 | 0 | let end = end.unwrap_or(usize::MAX); | 700 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 701 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| set.contains_token(c)) | 702 | | } else { | 703 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| set.contains_token(c)) | 704 | | } | 705 | | } | 706 | | } | 707 | 21.5M | }) |
Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 682 | 10.0M | trace("take_till", move |i: &mut Input| { | 683 | 10.0M | match (start_inclusive, end_inclusive) { | 684 | | (0, None) => { | 685 | 5.01M | if <Input as StreamIsPartial>::is_partial_supported() { | 686 | 0 | take_till0::<_, _, _, true>(i, |c| set.contains_token(c)) | 687 | | } else { | 688 | 5.01M | take_till0::<_, _, _, false>(i, |c| set.contains_token(c)) | 689 | | } | 690 | | } | 691 | | (1, None) => { | 692 | 5.01M | if <Input as StreamIsPartial>::is_partial_supported() { | 693 | 0 | take_till1::<_, _, _, true>(i, |c| set.contains_token(c)) | 694 | | } else { | 695 | 5.01M | take_till1::<_, _, _, false>(i, |c| set.contains_token(c)) | 696 | | } | 697 | | } | 698 | 0 | (start, end) => { | 699 | 0 | let end = end.unwrap_or(usize::MAX); | 700 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 701 | 0 | take_till_m_n::<_, _, _, true>(i, start, end, |c| set.contains_token(c)) | 702 | | } else { | 703 | 0 | take_till_m_n::<_, _, _, false>(i, start, end, |c| set.contains_token(c)) | 704 | | } | 705 | | } | 706 | | } | 707 | 10.0M | }) |
Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0} |
708 | 107M | } winnow::token::take_till::<gix_config::parse::nom::comment::{closure#0}, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, core::ops::range::RangeFrom<usize>>Line | Count | Source | 669 | 97.7M | pub fn take_till<Set, Input, Error>( | 670 | 97.7M | occurrences: impl Into<Range>, | 671 | 97.7M | set: Set, | 672 | 97.7M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 673 | 97.7M | where | 674 | 97.7M | Input: StreamIsPartial + Stream, | 675 | 97.7M | Set: ContainsToken<<Input as Stream>::Token>, | 676 | 97.7M | Error: ParserError<Input>, | 677 | | { | 678 | | let Range { | 679 | 97.7M | start_inclusive, | 680 | 97.7M | end_inclusive, | 681 | 97.7M | } = occurrences.into(); | 682 | 97.7M | trace("take_till", move |i: &mut Input| { | 683 | | match (start_inclusive, end_inclusive) { | 684 | | (0, None) => { | 685 | | if <Input as StreamIsPartial>::is_partial_supported() { | 686 | | take_till0::<_, _, _, true>(i, |c| set.contains_token(c)) | 687 | | } else { | 688 | | take_till0::<_, _, _, false>(i, |c| set.contains_token(c)) | 689 | | } | 690 | | } | 691 | | (1, None) => { | 692 | | if <Input as StreamIsPartial>::is_partial_supported() { | 693 | | take_till1::<_, _, _, true>(i, |c| set.contains_token(c)) | 694 | | } else { | 695 | | take_till1::<_, _, _, false>(i, |c| set.contains_token(c)) | 696 | | } | 697 | | } | 698 | | (start, end) => { | 699 | | let end = end.unwrap_or(usize::MAX); | 700 | | if <Input as StreamIsPartial>::is_partial_supported() { | 701 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| set.contains_token(c)) | 702 | | } else { | 703 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| set.contains_token(c)) | 704 | | } | 705 | | } | 706 | | } | 707 | | }) | 708 | 97.7M | } |
Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Line | Count | Source | 669 | 10.0M | pub fn take_till<Set, Input, Error>( | 670 | 10.0M | occurrences: impl Into<Range>, | 671 | 10.0M | set: Set, | 672 | 10.0M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 673 | 10.0M | where | 674 | 10.0M | Input: StreamIsPartial + Stream, | 675 | 10.0M | Set: ContainsToken<<Input as Stream>::Token>, | 676 | 10.0M | Error: ParserError<Input>, | 677 | | { | 678 | | let Range { | 679 | 10.0M | start_inclusive, | 680 | 10.0M | end_inclusive, | 681 | 10.0M | } = occurrences.into(); | 682 | 10.0M | trace("take_till", move |i: &mut Input| { | 683 | | match (start_inclusive, end_inclusive) { | 684 | | (0, None) => { | 685 | | if <Input as StreamIsPartial>::is_partial_supported() { | 686 | | take_till0::<_, _, _, true>(i, |c| set.contains_token(c)) | 687 | | } else { | 688 | | take_till0::<_, _, _, false>(i, |c| set.contains_token(c)) | 689 | | } | 690 | | } | 691 | | (1, None) => { | 692 | | if <Input as StreamIsPartial>::is_partial_supported() { | 693 | | take_till1::<_, _, _, true>(i, |c| set.contains_token(c)) | 694 | | } else { | 695 | | take_till1::<_, _, _, false>(i, |c| set.contains_token(c)) | 696 | | } | 697 | | } | 698 | | (start, end) => { | 699 | | let end = end.unwrap_or(usize::MAX); | 700 | | if <Input as StreamIsPartial>::is_partial_supported() { | 701 | | take_till_m_n::<_, _, _, true>(i, start, end, |c| set.contains_token(c)) | 702 | | } else { | 703 | | take_till_m_n::<_, _, _, false>(i, start, end, |c| set.contains_token(c)) | 704 | | } | 705 | | } | 706 | | } | 707 | | }) | 708 | 10.0M | } |
Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Unexecuted instantiation: winnow::token::take_till::<gix_object::commit::message::decode::subject_and_body<()>::{closure#0}, &[u8], (), core::ops::range::RangeFrom<usize>>Unexecuted instantiation: winnow::token::take_till::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> |
709 | | |
710 | | /// Recognize an input slice containing the first N input elements (I[..N]). |
711 | | /// |
712 | | /// *Complete version*: It will return `Err(ErrMode::Backtrack(_))` if the input is shorter than the argument. |
713 | | /// |
714 | | /// *[Partial version][crate::_topic::partial]*: if the input has less than N elements, `take` will |
715 | | /// return a `ErrMode::Incomplete(Needed::new(M))` where M is the number of |
716 | | /// additional bytes the parser would need to succeed. |
717 | | /// It is well defined for `&[u8]` as the number of elements is the byte size, |
718 | | /// but for types like `&str`, we cannot know how many bytes correspond for |
719 | | /// the next few chars, so the result will be `ErrMode::Incomplete(Needed::Unknown)` |
720 | | /// |
721 | | /// # Effective Signature |
722 | | /// |
723 | | /// Assuming you are parsing a `&str` [Stream] with `0..` or `1..` ranges: |
724 | | /// ```rust |
725 | | /// # use std::ops::RangeFrom; |
726 | | /// # use winnow::prelude::*; |
727 | | /// # use winnow::stream::ContainsToken; |
728 | | /// # use winnow::error::ContextError; |
729 | | /// pub fn take<'i>(token_count: usize) -> impl Parser<&'i str, &'i str, ContextError> |
730 | | /// # { |
731 | | /// # winnow::token::take(token_count) |
732 | | /// # } |
733 | | /// ``` |
734 | | /// |
735 | | /// # Example |
736 | | /// |
737 | | /// ```rust |
738 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
739 | | /// # use winnow::prelude::*; |
740 | | /// use winnow::token::take; |
741 | | /// |
742 | | /// fn take6<'i>(s: &mut &'i str) -> ModalResult<&'i str> { |
743 | | /// take(6usize).parse_next(s) |
744 | | /// } |
745 | | /// |
746 | | /// assert_eq!(take6.parse_peek("1234567"), Ok(("7", "123456"))); |
747 | | /// assert_eq!(take6.parse_peek("things"), Ok(("", "things"))); |
748 | | /// assert!(take6.parse_peek("short").is_err()); |
749 | | /// assert!(take6.parse_peek("").is_err()); |
750 | | /// ``` |
751 | | /// |
752 | | /// The units that are taken will depend on the input type. For example, for a |
753 | | /// `&str` it will take a number of `char`'s, whereas for a `&[u8]` it will |
754 | | /// take that many `u8`'s: |
755 | | /// |
756 | | /// ```rust |
757 | | /// # use winnow::prelude::*; |
758 | | /// use winnow::error::ContextError; |
759 | | /// use winnow::token::take; |
760 | | /// |
761 | | /// assert_eq!(take::<_, _, ContextError>(1usize).parse_peek("💙"), Ok(("", "💙"))); |
762 | | /// assert_eq!(take::<_, _, ContextError>(1usize).parse_peek("💙".as_bytes()), Ok((b"\x9F\x92\x99".as_ref(), b"\xF0".as_ref()))); |
763 | | /// ``` |
764 | | /// |
765 | | /// ```rust |
766 | | /// # use winnow::prelude::*; |
767 | | /// # use winnow::error::{ErrMode, ContextError, Needed}; |
768 | | /// # use winnow::Partial; |
769 | | /// use winnow::token::take; |
770 | | /// |
771 | | /// fn take6<'i>(s: &mut Partial<&'i str>) -> ModalResult<&'i str> { |
772 | | /// take(6usize).parse_next(s) |
773 | | /// } |
774 | | /// |
775 | | /// assert_eq!(take6.parse_peek(Partial::new("1234567")), Ok((Partial::new("7"), "123456"))); |
776 | | /// assert_eq!(take6.parse_peek(Partial::new("things")), Ok((Partial::new(""), "things"))); |
777 | | /// // `Unknown` as we don't know the number of bytes that `count` corresponds to |
778 | | /// assert_eq!(take6.parse_peek(Partial::new("short")), Err(ErrMode::Incomplete(Needed::Unknown))); |
779 | | /// ``` |
780 | | #[inline(always)] |
781 | | pub fn take<UsizeLike, Input, Error>( |
782 | | token_count: UsizeLike, |
783 | | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> |
784 | | where |
785 | | Input: StreamIsPartial + Stream, |
786 | | UsizeLike: ToUsize, |
787 | | Error: ParserError<Input>, |
788 | | { |
789 | | let c = token_count.to_usize(); |
790 | | trace("take", move |i: &mut Input| { |
791 | | if <Input as StreamIsPartial>::is_partial_supported() { |
792 | | take_::<_, _, true>(i, c) |
793 | | } else { |
794 | | take_::<_, _, false>(i, c) |
795 | | } |
796 | | }) |
797 | | } |
798 | | |
799 | | fn take_<I, Error: ParserError<I>, const PARTIAL: bool>( |
800 | | i: &mut I, |
801 | | c: usize, |
802 | | ) -> Result<<I as Stream>::Slice, Error> |
803 | | where |
804 | | I: StreamIsPartial, |
805 | | I: Stream, |
806 | | { |
807 | | match i.offset_at(c) { |
808 | | Ok(offset) => Ok(i.next_slice(offset)), |
809 | | Err(e) if PARTIAL && i.is_partial() => Err(ParserError::incomplete(i, e)), |
810 | | Err(_needed) => Err(ParserError::from_input(i)), |
811 | | } |
812 | | } |
813 | | |
814 | | /// Recognize the input slice up to the first occurrence of a [literal]. |
815 | | /// |
816 | | /// Feature `simd` will enable the use of [`memchr`](https://docs.rs/memchr/latest/memchr/). |
817 | | /// |
818 | | /// It doesn't consume the literal. |
819 | | /// |
820 | | /// *Complete version*: It will return `Err(ErrMode::Backtrack(_))` |
821 | | /// if the literal wasn't met. |
822 | | /// |
823 | | /// *[Partial version][crate::_topic::partial]*: will return a `ErrMode::Incomplete(Needed::new(N))` if the input doesn't |
824 | | /// contain the literal or if the input is smaller than the literal. |
825 | | /// |
826 | | /// See also |
827 | | /// - [`take_till`] for recognizing up-to a [set of tokens][ContainsToken] |
828 | | /// - [`repeat_till`][crate::combinator::repeat_till] with [`Parser::take`] for taking tokens up to a [`Parser`] |
829 | | /// |
830 | | /// # Effective Signature |
831 | | /// |
832 | | /// Assuming you are parsing a `&str` [Stream] with `0..` or `1..` [ranges][Range]: |
833 | | /// ```rust |
834 | | /// # use std::ops::RangeFrom; |
835 | | /// # use winnow::prelude::*;; |
836 | | /// # use winnow::error::ContextError; |
837 | | /// pub fn take_until(occurrences: RangeFrom<usize>, literal: &str) -> impl Parser<&str, &str, ContextError> |
838 | | /// # { |
839 | | /// # winnow::token::take_until(occurrences, literal) |
840 | | /// # } |
841 | | /// ``` |
842 | | /// |
843 | | /// # Example |
844 | | /// |
845 | | /// ```rust |
846 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
847 | | /// # use winnow::prelude::*; |
848 | | /// use winnow::token::take_until; |
849 | | /// |
850 | | /// fn until_eof<'i>(s: &mut &'i str) -> ModalResult<&'i str> { |
851 | | /// take_until(0.., "eof").parse_next(s) |
852 | | /// } |
853 | | /// |
854 | | /// assert_eq!(until_eof.parse_peek("hello, worldeof"), Ok(("eof", "hello, world"))); |
855 | | /// assert!(until_eof.parse_peek("hello, world").is_err()); |
856 | | /// assert!(until_eof.parse_peek("").is_err()); |
857 | | /// assert_eq!(until_eof.parse_peek("1eof2eof"), Ok(("eof2eof", "1"))); |
858 | | /// ``` |
859 | | /// |
860 | | /// ```rust |
861 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
862 | | /// # use winnow::prelude::*; |
863 | | /// # use winnow::Partial; |
864 | | /// use winnow::token::take_until; |
865 | | /// |
866 | | /// fn until_eof<'i>(s: &mut Partial<&'i str>) -> ModalResult<&'i str> { |
867 | | /// take_until(0.., "eof").parse_next(s) |
868 | | /// } |
869 | | /// |
870 | | /// assert_eq!(until_eof.parse_peek(Partial::new("hello, worldeof")), Ok((Partial::new("eof"), "hello, world"))); |
871 | | /// assert_eq!(until_eof.parse_peek(Partial::new("hello, world")), Err(ErrMode::Incomplete(Needed::Unknown))); |
872 | | /// assert_eq!(until_eof.parse_peek(Partial::new("hello, worldeo")), Err(ErrMode::Incomplete(Needed::Unknown))); |
873 | | /// assert_eq!(until_eof.parse_peek(Partial::new("1eof2eof")), Ok((Partial::new("eof2eof"), "1"))); |
874 | | /// ``` |
875 | | /// |
876 | | /// ```rust |
877 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
878 | | /// # use winnow::prelude::*; |
879 | | /// use winnow::token::take_until; |
880 | | /// |
881 | | /// fn until_eof<'i>(s: &mut &'i str) -> ModalResult<&'i str> { |
882 | | /// take_until(1.., "eof").parse_next(s) |
883 | | /// } |
884 | | /// |
885 | | /// assert_eq!(until_eof.parse_peek("hello, worldeof"), Ok(("eof", "hello, world"))); |
886 | | /// assert!(until_eof.parse_peek("hello, world").is_err()); |
887 | | /// assert!(until_eof.parse_peek("").is_err()); |
888 | | /// assert_eq!(until_eof.parse_peek("1eof2eof"), Ok(("eof2eof", "1"))); |
889 | | /// assert!(until_eof.parse_peek("eof").is_err()); |
890 | | /// ``` |
891 | | /// |
892 | | /// ```rust |
893 | | /// # use winnow::{error::ErrMode, error::ContextError, error::Needed}; |
894 | | /// # use winnow::prelude::*; |
895 | | /// # use winnow::Partial; |
896 | | /// use winnow::token::take_until; |
897 | | /// |
898 | | /// fn until_eof<'i>(s: &mut Partial<&'i str>) -> ModalResult<&'i str> { |
899 | | /// take_until(1.., "eof").parse_next(s) |
900 | | /// } |
901 | | /// |
902 | | /// assert_eq!(until_eof.parse_peek(Partial::new("hello, worldeof")), Ok((Partial::new("eof"), "hello, world"))); |
903 | | /// assert_eq!(until_eof.parse_peek(Partial::new("hello, world")), Err(ErrMode::Incomplete(Needed::Unknown))); |
904 | | /// assert_eq!(until_eof.parse_peek(Partial::new("hello, worldeo")), Err(ErrMode::Incomplete(Needed::Unknown))); |
905 | | /// assert_eq!(until_eof.parse_peek(Partial::new("1eof2eof")), Ok((Partial::new("eof2eof"), "1"))); |
906 | | /// assert!(until_eof.parse_peek(Partial::new("eof")).is_err()); |
907 | | /// ``` |
908 | | #[inline(always)] |
909 | 2.58M | pub fn take_until<Literal, Input, Error>( |
910 | 2.58M | occurrences: impl Into<Range>, |
911 | 2.58M | literal: Literal, |
912 | 2.58M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> |
913 | 2.58M | where |
914 | 2.58M | Input: StreamIsPartial + Stream + FindSlice<Literal>, |
915 | 2.58M | Literal: Clone, |
916 | 2.58M | Error: ParserError<Input>, |
917 | | { |
918 | | let Range { |
919 | 2.58M | start_inclusive, |
920 | 2.58M | end_inclusive, |
921 | 2.58M | } = occurrences.into(); |
922 | 2.58M | trace("take_until", move |i: &mut Input| { |
923 | 214k | match (start_inclusive, end_inclusive) { |
924 | | (0, None) => { |
925 | 214k | if <Input as StreamIsPartial>::is_partial_supported() { |
926 | 0 | take_until0_::<_, _, _, true>(i, literal.clone()) |
927 | | } else { |
928 | 214k | take_until0_::<_, _, _, false>(i, literal.clone()) |
929 | | } |
930 | | } |
931 | | (1, None) => { |
932 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { |
933 | 0 | take_until1_::<_, _, _, true>(i, literal.clone()) |
934 | | } else { |
935 | 0 | take_until1_::<_, _, _, false>(i, literal.clone()) |
936 | | } |
937 | | } |
938 | 0 | (start, end) => { |
939 | 0 | let end = end.unwrap_or(usize::MAX); |
940 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { |
941 | 0 | take_until_m_n_::<_, _, _, true>(i, start, end, literal.clone()) |
942 | | } else { |
943 | 0 | take_until_m_n_::<_, _, _, false>(i, start, end, literal.clone()) |
944 | | } |
945 | | } |
946 | | } |
947 | 214k | }) Unexecuted instantiation: winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Line | Count | Source | 922 | 214k | trace("take_until", move |i: &mut Input| { | 923 | 214k | match (start_inclusive, end_inclusive) { | 924 | | (0, None) => { | 925 | 214k | if <Input as StreamIsPartial>::is_partial_supported() { | 926 | 0 | take_until0_::<_, _, _, true>(i, literal.clone()) | 927 | | } else { | 928 | 214k | take_until0_::<_, _, _, false>(i, literal.clone()) | 929 | | } | 930 | | } | 931 | | (1, None) => { | 932 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 933 | 0 | take_until1_::<_, _, _, true>(i, literal.clone()) | 934 | | } else { | 935 | 0 | take_until1_::<_, _, _, false>(i, literal.clone()) | 936 | | } | 937 | | } | 938 | 0 | (start, end) => { | 939 | 0 | let end = end.unwrap_or(usize::MAX); | 940 | 0 | if <Input as StreamIsPartial>::is_partial_supported() { | 941 | 0 | take_until_m_n_::<_, _, _, true>(i, start, end, literal.clone()) | 942 | | } else { | 943 | 0 | take_until_m_n_::<_, _, _, false>(i, start, end, literal.clone()) | 944 | | } | 945 | | } | 946 | | } | 947 | 214k | }) |
Unexecuted instantiation: winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}Unexecuted instantiation: winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0} |
948 | 2.58M | } Unexecuted instantiation: winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Line | Count | Source | 909 | 2.58M | pub fn take_until<Literal, Input, Error>( | 910 | 2.58M | occurrences: impl Into<Range>, | 911 | 2.58M | literal: Literal, | 912 | 2.58M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 913 | 2.58M | where | 914 | 2.58M | Input: StreamIsPartial + Stream + FindSlice<Literal>, | 915 | 2.58M | Literal: Clone, | 916 | 2.58M | Error: ParserError<Input>, | 917 | | { | 918 | | let Range { | 919 | 2.58M | start_inclusive, | 920 | 2.58M | end_inclusive, | 921 | 2.58M | } = occurrences.into(); | 922 | 2.58M | trace("take_until", move |i: &mut Input| { | 923 | | match (start_inclusive, end_inclusive) { | 924 | | (0, None) => { | 925 | | if <Input as StreamIsPartial>::is_partial_supported() { | 926 | | take_until0_::<_, _, _, true>(i, literal.clone()) | 927 | | } else { | 928 | | take_until0_::<_, _, _, false>(i, literal.clone()) | 929 | | } | 930 | | } | 931 | | (1, None) => { | 932 | | if <Input as StreamIsPartial>::is_partial_supported() { | 933 | | take_until1_::<_, _, _, true>(i, literal.clone()) | 934 | | } else { | 935 | | take_until1_::<_, _, _, false>(i, literal.clone()) | 936 | | } | 937 | | } | 938 | | (start, end) => { | 939 | | let end = end.unwrap_or(usize::MAX); | 940 | | if <Input as StreamIsPartial>::is_partial_supported() { | 941 | | take_until_m_n_::<_, _, _, true>(i, start, end, literal.clone()) | 942 | | } else { | 943 | | take_until_m_n_::<_, _, _, false>(i, start, end, literal.clone()) | 944 | | } | 945 | | } | 946 | | } | 947 | | }) | 948 | 2.58M | } |
Unexecuted instantiation: winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Unexecuted instantiation: winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> Unexecuted instantiation: winnow::token::take_until::<&[u8], &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>> |
949 | | |
950 | 214k | fn take_until0_<T, I, Error: ParserError<I>, const PARTIAL: bool>( |
951 | 214k | i: &mut I, |
952 | 214k | t: T, |
953 | 214k | ) -> Result<<I as Stream>::Slice, Error> |
954 | 214k | where |
955 | 214k | I: StreamIsPartial, |
956 | 214k | I: Stream + FindSlice<T>, |
957 | | { |
958 | 214k | match i.find_slice(t) { |
959 | 212k | Some(range) => Ok(i.next_slice(range.start)), |
960 | 1.38k | None if PARTIAL && i.is_partial() => Err(ParserError::incomplete(i, Needed::Unknown)), |
961 | 1.38k | None => Err(ParserError::from_input(i)), |
962 | | } |
963 | 214k | } Unexecuted instantiation: winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Line | Count | Source | 950 | 214k | fn take_until0_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 951 | 214k | i: &mut I, | 952 | 214k | t: T, | 953 | 214k | ) -> Result<<I as Stream>::Slice, Error> | 954 | 214k | where | 955 | 214k | I: StreamIsPartial, | 956 | 214k | I: Stream + FindSlice<T>, | 957 | | { | 958 | 214k | match i.find_slice(t) { | 959 | 212k | Some(range) => Ok(i.next_slice(range.start)), | 960 | 1.38k | None if PARTIAL && i.is_partial() => Err(ParserError::incomplete(i, Needed::Unknown)), | 961 | 1.38k | None => Err(ParserError::from_input(i)), | 962 | | } | 963 | 214k | } |
Unexecuted instantiation: winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until0_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> |
964 | | |
965 | 0 | fn take_until1_<T, I, Error: ParserError<I>, const PARTIAL: bool>( |
966 | 0 | i: &mut I, |
967 | 0 | t: T, |
968 | 0 | ) -> Result<<I as Stream>::Slice, Error> |
969 | 0 | where |
970 | 0 | I: StreamIsPartial, |
971 | 0 | I: Stream + FindSlice<T>, |
972 | | { |
973 | 0 | match i.find_slice(t) { |
974 | 0 | None if PARTIAL && i.is_partial() => Err(ParserError::incomplete(i, Needed::Unknown)), |
975 | 0 | None => Err(ParserError::from_input(i)), |
976 | 0 | Some(range) => { |
977 | 0 | if range.start == 0 { |
978 | 0 | Err(ParserError::from_input(i)) |
979 | | } else { |
980 | 0 | Ok(i.next_slice(range.start)) |
981 | | } |
982 | | } |
983 | | } |
984 | 0 | } Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until1_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> |
985 | | |
986 | 0 | fn take_until_m_n_<T, I, Error: ParserError<I>, const PARTIAL: bool>( |
987 | 0 | i: &mut I, |
988 | 0 | start: usize, |
989 | 0 | end: usize, |
990 | 0 | t: T, |
991 | 0 | ) -> Result<<I as Stream>::Slice, Error> |
992 | 0 | where |
993 | 0 | I: StreamIsPartial, |
994 | 0 | I: Stream + FindSlice<T>, |
995 | | { |
996 | 0 | if end < start { |
997 | 0 | return Err(ParserError::assert( |
998 | 0 | i, |
999 | 0 | "`occurrences` should be ascending, rather than descending", |
1000 | 0 | )); |
1001 | 0 | } |
1002 | | |
1003 | 0 | match i.find_slice(t) { |
1004 | 0 | Some(range) => { |
1005 | 0 | let start_offset = i.offset_at(start); |
1006 | 0 | let end_offset = i.offset_at(end).unwrap_or_else(|_err| i.eof_offset()); Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#0}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#0}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#0}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#0}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#0}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#0}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#0}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#0}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#0}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#0} |
1007 | 0 | if start_offset.map(|s| range.start < s).unwrap_or(true) {Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#1}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#1}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#1}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#1}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#1}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#1}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#1}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#1}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false>::{closure#1}Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true>::{closure#1} |
1008 | 0 | if PARTIAL && i.is_partial() { |
1009 | 0 | return Err(ParserError::incomplete(i, Needed::Unknown)); |
1010 | | } else { |
1011 | 0 | return Err(ParserError::from_input(i)); |
1012 | | } |
1013 | 0 | } |
1014 | 0 | if end_offset < range.start { |
1015 | 0 | return Err(ParserError::from_input(i)); |
1016 | 0 | } |
1017 | 0 | Ok(i.next_slice(range.start)) |
1018 | | } |
1019 | 0 | None if PARTIAL && i.is_partial() => Err(ParserError::incomplete(i, Needed::Unknown)), |
1020 | 0 | None => Err(ParserError::from_input(i)), |
1021 | | } |
1022 | 0 | } Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, false> Unexecuted instantiation: winnow::token::take_until_m_n_::<&[u8], &[u8], winnow::error::ErrMode<()>, true> |
1023 | | |
1024 | | /// Return the remaining input. |
1025 | | /// |
1026 | | /// # Effective Signature |
1027 | | /// |
1028 | | /// Assuming you are parsing a `&str` [Stream]: |
1029 | | /// ```rust |
1030 | | /// # use winnow::prelude::*;; |
1031 | | /// pub fn rest<'i>(input: &mut &'i str) -> ModalResult<&'i str> |
1032 | | /// # { |
1033 | | /// # winnow::token::rest.parse_next(input) |
1034 | | /// # } |
1035 | | /// ``` |
1036 | | /// |
1037 | | /// # Example |
1038 | | /// |
1039 | | /// ```rust |
1040 | | /// # use winnow::prelude::*; |
1041 | | /// # use winnow::error::ContextError; |
1042 | | /// use winnow::token::rest; |
1043 | | /// assert_eq!(rest::<_,ContextError>.parse_peek("abc"), Ok(("", "abc"))); |
1044 | | /// assert_eq!(rest::<_,ContextError>.parse_peek(""), Ok(("", ""))); |
1045 | | /// ``` |
1046 | | #[inline] |
1047 | 6.16k | pub fn rest<Input, Error>(input: &mut Input) -> Result<<Input as Stream>::Slice, Error> |
1048 | 6.16k | where |
1049 | 6.16k | Input: Stream, |
1050 | 6.16k | Error: ParserError<Input>, |
1051 | | { |
1052 | 6.16k | trace("rest", move |input: &mut Input| Ok(input.finish())).parse_next(input)Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>>::{closure#0}winnow::token::rest::<&[u8], winnow::error::ErrMode<()>>::{closure#0}Line | Count | Source | 1052 | 1.89k | trace("rest", move |input: &mut Input| Ok(input.finish())).parse_next(input) |
winnow::token::rest::<&[u8], winnow::error::ErrMode<()>>::{closure#0}Line | Count | Source | 1052 | 4.27k | trace("rest", move |input: &mut Input| Ok(input.finish())).parse_next(input) |
Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>>::{closure#0}Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>>::{closure#0} |
1053 | 6.16k | } Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>> winnow::token::rest::<&[u8], winnow::error::ErrMode<()>> Line | Count | Source | 1047 | 1.89k | pub fn rest<Input, Error>(input: &mut Input) -> Result<<Input as Stream>::Slice, Error> | 1048 | 1.89k | where | 1049 | 1.89k | Input: Stream, | 1050 | 1.89k | Error: ParserError<Input>, | 1051 | | { | 1052 | 1.89k | trace("rest", move |input: &mut Input| Ok(input.finish())).parse_next(input) | 1053 | 1.89k | } |
winnow::token::rest::<&[u8], winnow::error::ErrMode<()>> Line | Count | Source | 1047 | 4.27k | pub fn rest<Input, Error>(input: &mut Input) -> Result<<Input as Stream>::Slice, Error> | 1048 | 4.27k | where | 1049 | 4.27k | Input: Stream, | 1050 | 4.27k | Error: ParserError<Input>, | 1051 | | { | 1052 | 4.27k | trace("rest", move |input: &mut Input| Ok(input.finish())).parse_next(input) | 1053 | 4.27k | } |
Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>> Unexecuted instantiation: winnow::token::rest::<&[u8], winnow::error::ErrMode<()>> |
1054 | | |
1055 | | /// Return the length of the remaining input. |
1056 | | /// |
1057 | | /// <div class="warning"> |
1058 | | /// |
1059 | | /// Note: this does not advance the [`Stream`] |
1060 | | /// |
1061 | | /// </div> |
1062 | | /// |
1063 | | /// # Effective Signature |
1064 | | /// |
1065 | | /// Assuming you are parsing a `&str` [Stream]: |
1066 | | /// ```rust |
1067 | | /// # use winnow::prelude::*;; |
1068 | | /// pub fn rest_len(input: &mut &str) -> ModalResult<usize> |
1069 | | /// # { |
1070 | | /// # winnow::token::rest_len.parse_next(input) |
1071 | | /// # } |
1072 | | /// ``` |
1073 | | /// |
1074 | | /// # Example |
1075 | | /// |
1076 | | /// ```rust |
1077 | | /// # use winnow::prelude::*; |
1078 | | /// # use winnow::error::ContextError; |
1079 | | /// use winnow::token::rest_len; |
1080 | | /// assert_eq!(rest_len::<_,ContextError>.parse_peek("abc"), Ok(("abc", 3))); |
1081 | | /// assert_eq!(rest_len::<_,ContextError>.parse_peek(""), Ok(("", 0))); |
1082 | | /// ``` |
1083 | | #[inline] |
1084 | | pub fn rest_len<Input, Error>(input: &mut Input) -> Result<usize, Error> |
1085 | | where |
1086 | | Input: Stream, |
1087 | | Error: ParserError<Input>, |
1088 | | { |
1089 | | trace("rest_len", move |input: &mut Input| { |
1090 | | let len = input.eof_offset(); |
1091 | | Ok(len) |
1092 | | }) |
1093 | | .parse_next(input) |
1094 | | } |