/rust/registry/src/index.crates.io-1949cf8c6b5b557f/winnow-0.7.13/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::lib::std::result::Result::Ok; |
11 | | use crate::stream::Range; |
12 | | use crate::stream::{Compare, CompareResult, ContainsToken, FindSlice, Stream}; |
13 | | use crate::stream::{StreamIsPartial, ToUsize}; |
14 | | use crate::Parser; |
15 | | use crate::Result; |
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 | 144M | pub fn any<Input, Error>(input: &mut Input) -> Result<<Input as Stream>::Token, Error> |
57 | 144M | where |
58 | 144M | Input: StreamIsPartial + Stream, |
59 | 144M | Error: ParserError<Input>, |
60 | | { |
61 | 144M | trace("any", move |input: &mut Input| { |
62 | 144M | if <Input as StreamIsPartial>::is_partial_supported() { |
63 | 0 | any_::<_, _, true>(input) |
64 | | } else { |
65 | 144M | any_::<_, _, false>(input) |
66 | | } |
67 | 144M | }) |
68 | 144M | .parse_next(input) |
69 | 144M | } |
70 | | |
71 | 144M | fn any_<I, E: ParserError<I>, const PARTIAL: bool>(input: &mut I) -> Result<<I as Stream>::Token, E> |
72 | 144M | where |
73 | 144M | I: StreamIsPartial, |
74 | 144M | I: Stream, |
75 | | { |
76 | 144M | input.next_token().ok_or_else(|| { |
77 | 41.2k | if PARTIAL && input.is_partial() { |
78 | 0 | ParserError::incomplete(input, Needed::new(1)) |
79 | | } else { |
80 | 41.2k | ParserError::from_input(input) |
81 | | } |
82 | 41.2k | }) winnow::token::any_::<&[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false>::{closure#0} Line | Count | Source | 76 | 41.2k | input.next_token().ok_or_else(|| { | 77 | 41.2k | if PARTIAL && input.is_partial() { | 78 | 0 | ParserError::incomplete(input, Needed::new(1)) | 79 | | } else { | 80 | 41.2k | ParserError::from_input(input) | 81 | | } | 82 | 41.2k | }) |
Unexecuted instantiation: winnow::token::any_::<&[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, true>::{closure#0} |
83 | 144M | } winnow::token::any_::<&[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false> Line | Count | Source | 71 | 144M | fn any_<I, E: ParserError<I>, const PARTIAL: bool>(input: &mut I) -> Result<<I as Stream>::Token, E> | 72 | 144M | where | 73 | 144M | I: StreamIsPartial, | 74 | 144M | I: Stream, | 75 | | { | 76 | 144M | 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 | 144M | } |
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 | 259M | pub fn literal<Literal, Input, Error>( |
161 | 259M | literal: Literal, |
162 | 259M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> |
163 | 259M | where |
164 | 259M | Input: StreamIsPartial + Stream + Compare<Literal>, |
165 | 259M | Literal: Clone + crate::lib::std::fmt::Debug, |
166 | 259M | Error: ParserError<Input>, |
167 | | { |
168 | 259M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { |
169 | 259M | let t = literal.clone(); |
170 | 259M | if <Input as StreamIsPartial>::is_partial_supported() { |
171 | 0 | literal_::<_, _, _, true>(i, t) |
172 | | } else { |
173 | 259M | literal_::<_, _, _, false>(i, t) |
174 | | } |
175 | 259M | }) winnow::token::literal::<&str, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>>::{closure#0} Line | Count | Source | 168 | 208M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 208M | let t = literal.clone(); | 170 | 208M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 208M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 208M | }) |
winnow::token::literal::<char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>>::{closure#0} Line | Count | Source | 168 | 36.5M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 36.5M | let t = literal.clone(); | 170 | 36.5M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 36.5M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 36.5M | }) |
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.20k | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 5.20k | let t = literal.clone(); | 170 | 5.20k | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 5.20k | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 5.20k | }) |
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 | 8.73M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 8.73M | let t = literal.clone(); | 170 | 8.73M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 8.73M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 8.73M | }) |
winnow::token::literal::<&[u8; 18], &[u8], winnow::error::ErrMode<()>>::{closure#0} Line | Count | Source | 168 | 18 | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 18 | let t = literal.clone(); | 170 | 18 | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 18 | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 18 | }) |
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 | 4.49M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 4.49M | let t = literal.clone(); | 170 | 4.49M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 4.49M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 4.49M | }) |
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.47M | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 1.47M | let t = literal.clone(); | 170 | 1.47M | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 1.47M | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 1.47M | }) |
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 | 67.7k | trace(DisplayDebug(literal.clone()), move |i: &mut Input| { | 169 | 67.7k | let t = literal.clone(); | 170 | 67.7k | if <Input as StreamIsPartial>::is_partial_supported() { | 171 | 0 | literal_::<_, _, _, true>(i, t) | 172 | | } else { | 173 | 67.7k | literal_::<_, _, _, false>(i, t) | 174 | | } | 175 | 67.7k | }) |
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 | 259M | } winnow::token::literal::<&str, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>> Line | Count | Source | 160 | 208M | pub fn literal<Literal, Input, Error>( | 161 | 208M | literal: Literal, | 162 | 208M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 208M | where | 164 | 208M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 208M | Literal: Clone + crate::lib::std::fmt::Debug, | 166 | 208M | Error: ParserError<Input>, | 167 | | { | 168 | 208M | 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 | 208M | } |
winnow::token::literal::<char, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>> Line | Count | Source | 160 | 36.5M | pub fn literal<Literal, Input, Error>( | 161 | 36.5M | literal: Literal, | 162 | 36.5M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 36.5M | where | 164 | 36.5M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 36.5M | Literal: Clone + crate::lib::std::fmt::Debug, | 166 | 36.5M | Error: ParserError<Input>, | 167 | | { | 168 | 36.5M | 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 | 36.5M | } |
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.20k | pub fn literal<Literal, Input, Error>( | 161 | 5.20k | literal: Literal, | 162 | 5.20k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 5.20k | where | 164 | 5.20k | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 5.20k | Literal: Clone + crate::lib::std::fmt::Debug, | 166 | 5.20k | Error: ParserError<Input>, | 167 | | { | 168 | 5.20k | 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.20k | } |
Unexecuted instantiation: winnow::token::literal::<&[u8; 2], &[u8], winnow::error::ErrMode<()>> winnow::token::literal::<&[u8], &[u8], winnow::error::ErrMode<()>> Line | Count | Source | 160 | 8.73M | pub fn literal<Literal, Input, Error>( | 161 | 8.73M | literal: Literal, | 162 | 8.73M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 8.73M | where | 164 | 8.73M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 8.73M | Literal: Clone + crate::lib::std::fmt::Debug, | 166 | 8.73M | Error: ParserError<Input>, | 167 | | { | 168 | 8.73M | 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 | 8.73M | } |
winnow::token::literal::<&[u8; 18], &[u8], winnow::error::ErrMode<()>> Line | Count | Source | 160 | 18 | pub fn literal<Literal, Input, Error>( | 161 | 18 | literal: Literal, | 162 | 18 | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 18 | where | 164 | 18 | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 18 | Literal: Clone + crate::lib::std::fmt::Debug, | 166 | 18 | Error: ParserError<Input>, | 167 | | { | 168 | 18 | 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 | 18 | } |
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 | 4.49M | pub fn literal<Literal, Input, Error>( | 161 | 4.49M | literal: Literal, | 162 | 4.49M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 4.49M | where | 164 | 4.49M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 4.49M | Literal: Clone + crate::lib::std::fmt::Debug, | 166 | 4.49M | Error: ParserError<Input>, | 167 | | { | 168 | 4.49M | 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 | 4.49M | } |
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.47M | pub fn literal<Literal, Input, Error>( | 161 | 1.47M | literal: Literal, | 162 | 1.47M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 1.47M | where | 164 | 1.47M | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 1.47M | Literal: Clone + crate::lib::std::fmt::Debug, | 166 | 1.47M | Error: ParserError<Input>, | 167 | | { | 168 | 1.47M | 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.47M | } |
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 | 67.7k | pub fn literal<Literal, Input, Error>( | 161 | 67.7k | literal: Literal, | 162 | 67.7k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 163 | 67.7k | where | 164 | 67.7k | Input: StreamIsPartial + Stream + Compare<Literal>, | 165 | 67.7k | Literal: Clone + crate::lib::std::fmt::Debug, | 166 | 67.7k | Error: ParserError<Input>, | 167 | | { | 168 | 67.7k | 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 | 67.7k | } |
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 | 259M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( |
179 | 259M | i: &mut I, |
180 | 259M | t: T, |
181 | 259M | ) -> Result<<I as Stream>::Slice, Error> |
182 | 259M | where |
183 | 259M | I: StreamIsPartial, |
184 | 259M | I: Stream + Compare<T>, |
185 | 259M | T: crate::lib::std::fmt::Debug, |
186 | | { |
187 | 259M | match i.compare(t) { |
188 | 76.5M | CompareResult::Ok(len) => Ok(i.next_slice(len)), |
189 | 144k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { |
190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) |
191 | | } |
192 | 183M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), |
193 | | } |
194 | 259M | } winnow::token::literal_::<&str, &[u8], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>, false> Line | Count | Source | 178 | 208M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 208M | i: &mut I, | 180 | 208M | t: T, | 181 | 208M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 208M | where | 183 | 208M | I: StreamIsPartial, | 184 | 208M | I: Stream + Compare<T>, | 185 | 208M | T: crate::lib::std::fmt::Debug, | 186 | | { | 187 | 208M | match i.compare(t) { | 188 | 46.4M | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 47.3k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 161M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 208M | } |
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 | 36.5M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 36.5M | i: &mut I, | 180 | 36.5M | t: T, | 181 | 36.5M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 36.5M | where | 183 | 36.5M | I: StreamIsPartial, | 184 | 36.5M | I: Stream + Compare<T>, | 185 | 36.5M | T: crate::lib::std::fmt::Debug, | 186 | | { | 187 | 36.5M | match i.compare(t) { | 188 | 19.8M | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 11.9k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 16.6M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 36.5M | } |
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.20k | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 5.20k | i: &mut I, | 180 | 5.20k | t: T, | 181 | 5.20k | ) -> Result<<I as Stream>::Slice, Error> | 182 | 5.20k | where | 183 | 5.20k | I: StreamIsPartial, | 184 | 5.20k | I: Stream + Compare<T>, | 185 | 5.20k | T: crate::lib::std::fmt::Debug, | 186 | | { | 187 | 5.20k | match i.compare(t) { | 188 | 656 | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 570 | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 4.54k | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 5.20k | } |
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 | 8.73M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 8.73M | i: &mut I, | 180 | 8.73M | t: T, | 181 | 8.73M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 8.73M | where | 183 | 8.73M | I: StreamIsPartial, | 184 | 8.73M | I: Stream + Compare<T>, | 185 | 8.73M | T: crate::lib::std::fmt::Debug, | 186 | | { | 187 | 8.73M | match i.compare(t) { | 188 | 7.01M | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 3.38k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 1.71M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 8.73M | } |
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 | 18 | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 18 | i: &mut I, | 180 | 18 | t: T, | 181 | 18 | ) -> Result<<I as Stream>::Slice, Error> | 182 | 18 | where | 183 | 18 | I: StreamIsPartial, | 184 | 18 | I: Stream + Compare<T>, | 185 | 18 | T: crate::lib::std::fmt::Debug, | 186 | | { | 187 | 18 | match i.compare(t) { | 188 | 0 | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 12 | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 18 | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 18 | } |
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 | 4.49M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 4.49M | i: &mut I, | 180 | 4.49M | t: T, | 181 | 4.49M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 4.49M | where | 183 | 4.49M | I: StreamIsPartial, | 184 | 4.49M | I: Stream + Compare<T>, | 185 | 4.49M | T: crate::lib::std::fmt::Debug, | 186 | | { | 187 | 4.49M | match i.compare(t) { | 188 | 3.09M | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 23.4k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 1.40M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 4.49M | } |
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.47M | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 1.47M | i: &mut I, | 180 | 1.47M | t: T, | 181 | 1.47M | ) -> Result<<I as Stream>::Slice, Error> | 182 | 1.47M | where | 183 | 1.47M | I: StreamIsPartial, | 184 | 1.47M | I: Stream + Compare<T>, | 185 | 1.47M | T: crate::lib::std::fmt::Debug, | 186 | | { | 187 | 1.47M | match i.compare(t) { | 188 | 38.0k | 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.43M | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 1.47M | } |
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 | 67.7k | fn literal_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 179 | 67.7k | i: &mut I, | 180 | 67.7k | t: T, | 181 | 67.7k | ) -> Result<<I as Stream>::Slice, Error> | 182 | 67.7k | where | 183 | 67.7k | I: StreamIsPartial, | 184 | 67.7k | I: Stream + Compare<T>, | 185 | 67.7k | T: crate::lib::std::fmt::Debug, | 186 | | { | 187 | 67.7k | match i.compare(t) { | 188 | 1.20k | CompareResult::Ok(len) => Ok(i.next_slice(len)), | 189 | 57.4k | CompareResult::Incomplete if PARTIAL && i.is_partial() => { | 190 | 0 | Err(ParserError::incomplete(i, Needed::Unknown)) | 191 | | } | 192 | 66.5k | CompareResult::Incomplete | CompareResult::Error => Err(ParserError::from_input(i)), | 193 | | } | 194 | 67.7k | } |
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 | 145M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> |
263 | 145M | where |
264 | 145M | Input: StreamIsPartial + Stream, |
265 | 145M | <Input as Stream>::Token: Clone, |
266 | 145M | Set: ContainsToken<<Input as Stream>::Token>, |
267 | 145M | Error: ParserError<Input>, |
268 | | { |
269 | 145M | trace( |
270 | | "one_of", |
271 | 145M | 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 | 75.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 | 50.3M | 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.90M | 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 | 14.8M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), |
|
272 | | ) |
273 | 145M | } winnow::token::one_of::<&[u8], [char; 2], winnow::error::ErrMode<winnow::error::InputError<&[u8]>>> Line | Count | Source | 262 | 75.7M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> | 263 | 75.7M | where | 264 | 75.7M | Input: StreamIsPartial + Stream, | 265 | 75.7M | <Input as Stream>::Token: Clone, | 266 | 75.7M | Set: ContainsToken<<Input as Stream>::Token>, | 267 | 75.7M | Error: ParserError<Input>, | 268 | | { | 269 | 75.7M | trace( | 270 | | "one_of", | 271 | 75.7M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), | 272 | | ) | 273 | 75.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 | 50.3M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> | 263 | 50.3M | where | 264 | 50.3M | Input: StreamIsPartial + Stream, | 265 | 50.3M | <Input as Stream>::Token: Clone, | 266 | 50.3M | Set: ContainsToken<<Input as Stream>::Token>, | 267 | 50.3M | Error: ParserError<Input>, | 268 | | { | 269 | 50.3M | trace( | 270 | | "one_of", | 271 | 50.3M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), | 272 | | ) | 273 | 50.3M | } |
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.61M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> | 263 | 4.61M | where | 264 | 4.61M | Input: StreamIsPartial + Stream, | 265 | 4.61M | <Input as Stream>::Token: Clone, | 266 | 4.61M | Set: ContainsToken<<Input as Stream>::Token>, | 267 | 4.61M | Error: ParserError<Input>, | 268 | | { | 269 | 4.61M | trace( | 270 | | "one_of", | 271 | 4.61M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), | 272 | | ) | 273 | 4.61M | } |
winnow::token::one_of::<&[u8], char, winnow::error::ErrMode<winnow::error::InputError<&[u8]>>> Line | Count | Source | 262 | 14.8M | pub fn one_of<Input, Set, Error>(set: Set) -> impl Parser<Input, <Input as Stream>::Token, Error> | 263 | 14.8M | where | 264 | 14.8M | Input: StreamIsPartial + Stream, | 265 | 14.8M | <Input as Stream>::Token: Clone, | 266 | 14.8M | Set: ContainsToken<<Input as Stream>::Token>, | 267 | 14.8M | Error: ParserError<Input>, | 268 | | { | 269 | 14.8M | trace( | 270 | | "one_of", | 271 | 14.8M | any.verify(move |t: &<Input as Stream>::Token| set.contains_token(t.clone())), | 272 | | ) | 273 | 14.8M | } |
|
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 | 175M | pub fn take_while<Set, Input, Error>( |
479 | 175M | occurrences: impl Into<Range>, |
480 | 175M | set: Set, |
481 | 175M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> |
482 | 175M | where |
483 | 175M | Input: StreamIsPartial + Stream, |
484 | 175M | Set: ContainsToken<<Input as Stream>::Token>, |
485 | 175M | Error: ParserError<Input>, |
486 | | { |
487 | | let Range { |
488 | 175M | start_inclusive, |
489 | 175M | end_inclusive, |
490 | 175M | } = occurrences.into(); |
491 | 175M | trace("take_while", move |i: &mut Input| { |
492 | 141M | match (start_inclusive, end_inclusive) { |
493 | | (0, None) => { |
494 | 33.6M | 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_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} |
496 | | } else { |
497 | 235M | 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 | 87.8M | 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 | 23.3M | 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 | 104k | 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_actor::signature::decode::function::decode<()>::{closure#0}, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeFrom<usize>>::{closure#0}::{closure#1} Line | Count | Source | 497 | 515k | take_till0::<_, _, _, false>(i, |c| !set.contains_token(c)) |
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 | 118M | 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.93M | 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} |
498 | | } |
499 | | } |
500 | | (1, None) => { |
501 | 103M | 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_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} |
503 | | } else { |
504 | 281M | 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 | 71.3M | 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 | 97.1M | 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 | 102M | 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 | 3.18M | 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 | 3.18M | 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 | 4.11M | 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} 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.10M | (start, end) => { |
508 | 4.10M | let end = end.unwrap_or(usize::MAX); |
509 | 4.10M | 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_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} |
511 | | } else { |
512 | 68.9M | 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 | 535k | 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_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} 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 | 68.4M | 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} |
513 | | } |
514 | | } |
515 | | } |
516 | 141M | }) 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 | 15.8M | trace("take_while", move |i: &mut Input| { | 492 | 15.8M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 15.8M | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 15.8M | 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 | 15.8M | }) |
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 | 16.2M | trace("take_while", move |i: &mut Input| { | 492 | 16.2M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 16.2M | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 16.2M | 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 | 16.2M | }) |
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 | 14.8M | trace("take_while", move |i: &mut Input| { | 492 | 14.8M | 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 | 14.8M | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 14.8M | 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 | 14.8M | }) |
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 | 8.22M | trace("take_while", move |i: &mut Input| { | 492 | 8.22M | 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 | 8.22M | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 8.22M | 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 | 8.22M | }) |
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 | 80.7M | trace("take_while", move |i: &mut Input| { | 492 | 80.7M | 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 | 80.7M | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 80.7M | 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 | 80.7M | }) |
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.20k | trace("take_while", move |i: &mut Input| { | 492 | 5.20k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 5.20k | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 5.20k | 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.20k | }) |
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.51k | trace("take_while", move |i: &mut Input| { | 492 | 1.51k | 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.51k | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 1.51k | 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.51k | }) |
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.51k | trace("take_while", move |i: &mut Input| { | 492 | 1.51k | 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.51k | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 1.51k | 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.51k | }) |
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 | 13.4k | trace("take_while", move |i: &mut Input| { | 492 | 13.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 | 13.4k | (start, end) => { | 508 | 13.4k | let end = end.unwrap_or(usize::MAX); | 509 | 13.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 | 13.4k | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 13.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.54k | trace("take_while", move |i: &mut Input| { | 492 | 3.54k | 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.54k | if <Input as StreamIsPartial>::is_partial_supported() { | 502 | 0 | take_till1::<_, _, _, true>(i, |c| !set.contains_token(c)) | 503 | | } else { | 504 | 3.54k | 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.54k | }) |
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 | 35.9k | trace("take_while", move |i: &mut Input| { | 492 | 35.9k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 35.9k | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 35.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 | 35.9k | }) |
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.42M | trace("take_while", move |i: &mut Input| { | 492 | 1.42M | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 1.42M | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 1.42M | 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.42M | }) |
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 | 19.2k | trace("take_while", move |i: &mut Input| { | 492 | 19.2k | match (start_inclusive, end_inclusive) { | 493 | | (0, None) => { | 494 | 19.2k | if <Input as StreamIsPartial>::is_partial_supported() { | 495 | 0 | take_till0::<_, _, _, true>(i, |c| !set.contains_token(c)) | 496 | | } else { | 497 | 19.2k | 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 | 19.2k | }) |
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.09M | trace("take_while", move |i: &mut Input| { | 492 | 4.09M | 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.09M | (start, end) => { | 508 | 4.09M | let end = end.unwrap_or(usize::MAX); | 509 | 4.09M | 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.09M | take_till_m_n::<_, _, _, false>(i, start, end, |c| !set.contains_token(c)) | 513 | | } | 514 | | } | 515 | | } | 516 | 4.09M | }) |
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} |
517 | 175M | } 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 | 15.8M | pub fn take_while<Set, Input, Error>( | 479 | 15.8M | occurrences: impl Into<Range>, | 480 | 15.8M | set: Set, | 481 | 15.8M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 15.8M | where | 483 | 15.8M | Input: StreamIsPartial + Stream, | 484 | 15.8M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 15.8M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 15.8M | start_inclusive, | 489 | 15.8M | end_inclusive, | 490 | 15.8M | } = occurrences.into(); | 491 | 15.8M | 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 | 15.8M | } |
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 | 50.3M | pub fn take_while<Set, Input, Error>( | 479 | 50.3M | occurrences: impl Into<Range>, | 480 | 50.3M | set: Set, | 481 | 50.3M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 50.3M | where | 483 | 50.3M | Input: StreamIsPartial + Stream, | 484 | 50.3M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 50.3M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 50.3M | start_inclusive, | 489 | 50.3M | end_inclusive, | 490 | 50.3M | } = occurrences.into(); | 491 | 50.3M | 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 | 50.3M | } |
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 | 14.8M | pub fn take_while<Set, Input, Error>( | 479 | 14.8M | occurrences: impl Into<Range>, | 480 | 14.8M | set: Set, | 481 | 14.8M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 14.8M | where | 483 | 14.8M | Input: StreamIsPartial + Stream, | 484 | 14.8M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 14.8M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 14.8M | start_inclusive, | 489 | 14.8M | end_inclusive, | 490 | 14.8M | } = occurrences.into(); | 491 | 14.8M | 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 | 14.8M | } |
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 | 8.22M | pub fn take_while<Set, Input, Error>( | 479 | 8.22M | occurrences: impl Into<Range>, | 480 | 8.22M | set: Set, | 481 | 8.22M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 8.22M | where | 483 | 8.22M | Input: StreamIsPartial + Stream, | 484 | 8.22M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 8.22M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 8.22M | start_inclusive, | 489 | 8.22M | end_inclusive, | 490 | 8.22M | } = occurrences.into(); | 491 | 8.22M | 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 | 8.22M | } |
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 | 80.7M | pub fn take_while<Set, Input, Error>( | 479 | 80.7M | occurrences: impl Into<Range>, | 480 | 80.7M | set: Set, | 481 | 80.7M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 80.7M | where | 483 | 80.7M | Input: StreamIsPartial + Stream, | 484 | 80.7M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 80.7M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 80.7M | start_inclusive, | 489 | 80.7M | end_inclusive, | 490 | 80.7M | } = occurrences.into(); | 491 | 80.7M | 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 | 80.7M | } |
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 | 6.76k | pub fn take_while<Set, Input, Error>( | 479 | 6.76k | occurrences: impl Into<Range>, | 480 | 6.76k | set: Set, | 481 | 6.76k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 6.76k | where | 483 | 6.76k | Input: StreamIsPartial + Stream, | 484 | 6.76k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 6.76k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 6.76k | start_inclusive, | 489 | 6.76k | end_inclusive, | 490 | 6.76k | } = occurrences.into(); | 491 | 6.76k | 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 | 6.76k | } |
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.52k | pub fn take_while<Set, Input, Error>( | 479 | 1.52k | occurrences: impl Into<Range>, | 480 | 1.52k | set: Set, | 481 | 1.52k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 1.52k | where | 483 | 1.52k | Input: StreamIsPartial + Stream, | 484 | 1.52k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 1.52k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 1.52k | start_inclusive, | 489 | 1.52k | end_inclusive, | 490 | 1.52k | } = occurrences.into(); | 491 | 1.52k | 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.52k | } |
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.51k | pub fn take_while<Set, Input, Error>( | 479 | 1.51k | occurrences: impl Into<Range>, | 480 | 1.51k | set: Set, | 481 | 1.51k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 1.51k | where | 483 | 1.51k | Input: StreamIsPartial + Stream, | 484 | 1.51k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 1.51k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 1.51k | start_inclusive, | 489 | 1.51k | end_inclusive, | 490 | 1.51k | } = occurrences.into(); | 491 | 1.51k | 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.51k | } |
winnow::token::take_while::<gix_object::parse::is_hex_digit_lc, &[u8], winnow::error::ErrMode<()>, core::ops::range::RangeInclusive<usize>> Line | Count | Source | 478 | 13.4k | pub fn take_while<Set, Input, Error>( | 479 | 13.4k | occurrences: impl Into<Range>, | 480 | 13.4k | set: Set, | 481 | 13.4k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 13.4k | where | 483 | 13.4k | Input: StreamIsPartial + Stream, | 484 | 13.4k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 13.4k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 13.4k | start_inclusive, | 489 | 13.4k | end_inclusive, | 490 | 13.4k | } = occurrences.into(); | 491 | 13.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 | 13.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.55k | pub fn take_while<Set, Input, Error>( | 479 | 3.55k | occurrences: impl Into<Range>, | 480 | 3.55k | set: Set, | 481 | 3.55k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 3.55k | where | 483 | 3.55k | Input: StreamIsPartial + Stream, | 484 | 3.55k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 3.55k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 3.55k | start_inclusive, | 489 | 3.55k | end_inclusive, | 490 | 3.55k | } = occurrences.into(); | 491 | 3.55k | 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.55k | } |
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 | 71.4k | pub fn take_while<Set, Input, Error>( | 479 | 71.4k | occurrences: impl Into<Range>, | 480 | 71.4k | set: Set, | 481 | 71.4k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 71.4k | where | 483 | 71.4k | Input: StreamIsPartial + Stream, | 484 | 71.4k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 71.4k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 71.4k | start_inclusive, | 489 | 71.4k | end_inclusive, | 490 | 71.4k | } = occurrences.into(); | 491 | 71.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 | 71.4k | } |
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.42M | pub fn take_while<Set, Input, Error>( | 479 | 1.42M | occurrences: impl Into<Range>, | 480 | 1.42M | set: Set, | 481 | 1.42M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 1.42M | where | 483 | 1.42M | Input: StreamIsPartial + Stream, | 484 | 1.42M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 1.42M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 1.42M | start_inclusive, | 489 | 1.42M | end_inclusive, | 490 | 1.42M | } = occurrences.into(); | 491 | 1.42M | 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.42M | } |
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 | 19.2k | pub fn take_while<Set, Input, Error>( | 479 | 19.2k | occurrences: impl Into<Range>, | 480 | 19.2k | set: Set, | 481 | 19.2k | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 19.2k | where | 483 | 19.2k | Input: StreamIsPartial + Stream, | 484 | 19.2k | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 19.2k | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 19.2k | start_inclusive, | 489 | 19.2k | end_inclusive, | 490 | 19.2k | } = occurrences.into(); | 491 | 19.2k | 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 | 19.2k | } |
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.09M | pub fn take_while<Set, Input, Error>( | 479 | 4.09M | occurrences: impl Into<Range>, | 480 | 4.09M | set: Set, | 481 | 4.09M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 482 | 4.09M | where | 483 | 4.09M | Input: StreamIsPartial + Stream, | 484 | 4.09M | Set: ContainsToken<<Input as Stream>::Token>, | 485 | 4.09M | Error: ParserError<Input>, | 486 | | { | 487 | | let Range { | 488 | 4.09M | start_inclusive, | 489 | 4.09M | end_inclusive, | 490 | 4.09M | } = occurrences.into(); | 491 | 4.09M | 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.09M | } |
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>> |
518 | | |
519 | 60.7M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( |
520 | 60.7M | input: &mut I, |
521 | 60.7M | predicate: P, |
522 | 60.7M | ) -> Result<<I as Stream>::Slice, E> |
523 | 60.7M | where |
524 | 60.7M | P: Fn(I::Token) -> bool, |
525 | | { |
526 | 60.7M | let offset = match input.offset_for(predicate) { |
527 | 60.6M | Some(offset) => offset, |
528 | 52.8k | None if PARTIAL && input.is_partial() => { |
529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); |
530 | | } |
531 | 52.8k | None => input.eof_offset(), |
532 | | }; |
533 | 60.7M | Ok(input.next_slice(offset)) |
534 | 60.7M | } 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 | 15.8M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 15.8M | input: &mut I, | 521 | 15.8M | predicate: P, | 522 | 15.8M | ) -> Result<<I as Stream>::Slice, E> | 523 | 15.8M | where | 524 | 15.8M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 15.8M | let offset = match input.offset_for(predicate) { | 527 | 15.8M | Some(offset) => offset, | 528 | 1.71k | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 1.71k | None => input.eof_offset(), | 532 | | }; | 533 | 15.8M | Ok(input.next_slice(offset)) | 534 | 15.8M | } |
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 | 16.2M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 16.2M | input: &mut I, | 521 | 16.2M | predicate: P, | 522 | 16.2M | ) -> Result<<I as Stream>::Slice, E> | 523 | 16.2M | where | 524 | 16.2M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 16.2M | let offset = match input.offset_for(predicate) { | 527 | 16.2M | Some(offset) => offset, | 528 | 840 | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 840 | None => input.eof_offset(), | 532 | | }; | 533 | 16.2M | Ok(input.next_slice(offset)) | 534 | 16.2M | } |
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 | 23.7M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 23.7M | input: &mut I, | 521 | 23.7M | predicate: P, | 522 | 23.7M | ) -> Result<<I as Stream>::Slice, E> | 523 | 23.7M | where | 524 | 23.7M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 23.7M | let offset = match input.offset_for(predicate) { | 527 | 23.7M | Some(offset) => offset, | 528 | 909 | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 909 | None => input.eof_offset(), | 532 | | }; | 533 | 23.7M | Ok(input.next_slice(offset)) | 534 | 23.7M | } |
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.20k | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 5.20k | input: &mut I, | 521 | 5.20k | predicate: P, | 522 | 5.20k | ) -> Result<<I as Stream>::Slice, E> | 523 | 5.20k | where | 524 | 5.20k | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 5.20k | let offset = match input.offset_for(predicate) { | 527 | 4.43k | Some(offset) => offset, | 528 | 764 | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 764 | None => input.eof_offset(), | 532 | | }; | 533 | 5.20k | Ok(input.next_slice(offset)) | 534 | 5.20k | } |
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 | 3.32M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 3.32M | input: &mut I, | 521 | 3.32M | predicate: P, | 522 | 3.32M | ) -> Result<<I as Stream>::Slice, E> | 523 | 3.32M | where | 524 | 3.32M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 3.32M | let offset = match input.offset_for(predicate) { | 527 | 3.32M | Some(offset) => offset, | 528 | 182 | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 182 | None => input.eof_offset(), | 532 | | }; | 533 | 3.32M | Ok(input.next_slice(offset)) | 534 | 3.32M | } |
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 | 35.9k | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 35.9k | input: &mut I, | 521 | 35.9k | predicate: P, | 522 | 35.9k | ) -> Result<<I as Stream>::Slice, E> | 523 | 35.9k | where | 524 | 35.9k | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 35.9k | let offset = match input.offset_for(predicate) { | 527 | 6.03k | Some(offset) => offset, | 528 | 29.9k | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 29.9k | None => input.eof_offset(), | 532 | | }; | 533 | 35.9k | Ok(input.next_slice(offset)) | 534 | 35.9k | } |
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.42M | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 1.42M | input: &mut I, | 521 | 1.42M | predicate: P, | 522 | 1.42M | ) -> Result<<I as Stream>::Slice, E> | 523 | 1.42M | where | 524 | 1.42M | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 1.42M | let offset = match input.offset_for(predicate) { | 527 | 1.42M | Some(offset) => offset, | 528 | 14 | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 14 | None => input.eof_offset(), | 532 | | }; | 533 | 1.42M | Ok(input.next_slice(offset)) | 534 | 1.42M | } |
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 | 19.2k | fn take_till0<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 520 | 19.2k | input: &mut I, | 521 | 19.2k | predicate: P, | 522 | 19.2k | ) -> Result<<I as Stream>::Slice, E> | 523 | 19.2k | where | 524 | 19.2k | P: Fn(I::Token) -> bool, | 525 | | { | 526 | 19.2k | let offset = match input.offset_for(predicate) { | 527 | 840 | Some(offset) => offset, | 528 | 18.4k | None if PARTIAL && input.is_partial() => { | 529 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 530 | | } | 531 | 18.4k | None => input.eof_offset(), | 532 | | }; | 533 | 19.2k | Ok(input.next_slice(offset)) | 534 | 19.2k | } |
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> |
535 | | |
536 | 107M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( |
537 | 107M | input: &mut I, |
538 | 107M | predicate: P, |
539 | 107M | ) -> Result<<I as Stream>::Slice, E> |
540 | 107M | where |
541 | 107M | P: Fn(I::Token) -> bool, |
542 | | { |
543 | 107M | let offset = match input.offset_for(predicate) { |
544 | 107M | Some(offset) => offset, |
545 | 21.1k | None if PARTIAL && input.is_partial() => { |
546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); |
547 | | } |
548 | 21.1k | None => input.eof_offset(), |
549 | | }; |
550 | 107M | if offset == 0 { |
551 | 70.1M | Err(ParserError::from_input(input)) |
552 | | } else { |
553 | 37.0M | Ok(input.next_slice(offset)) |
554 | | } |
555 | 107M | } 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 | 14.8M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 14.8M | input: &mut I, | 538 | 14.8M | predicate: P, | 539 | 14.8M | ) -> Result<<I as Stream>::Slice, E> | 540 | 14.8M | where | 541 | 14.8M | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 14.8M | let offset = match input.offset_for(predicate) { | 544 | 14.8M | Some(offset) => offset, | 545 | 170 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 170 | None => input.eof_offset(), | 549 | | }; | 550 | 14.8M | if offset == 0 { | 551 | 210 | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 14.8M | Ok(input.next_slice(offset)) | 554 | | } | 555 | 14.8M | } |
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 | 8.22M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 8.22M | input: &mut I, | 538 | 8.22M | predicate: P, | 539 | 8.22M | ) -> Result<<I as Stream>::Slice, E> | 540 | 8.22M | where | 541 | 8.22M | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 8.22M | let offset = match input.offset_for(predicate) { | 544 | 8.22M | Some(offset) => offset, | 545 | 381 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 381 | None => input.eof_offset(), | 549 | | }; | 550 | 8.22M | if offset == 0 { | 551 | 4.61M | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 3.61M | Ok(input.next_slice(offset)) | 554 | | } | 555 | 8.22M | } |
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 | 80.7M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 80.7M | input: &mut I, | 538 | 80.7M | predicate: P, | 539 | 80.7M | ) -> Result<<I as Stream>::Slice, E> | 540 | 80.7M | where | 541 | 80.7M | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 80.7M | let offset = match input.offset_for(predicate) { | 544 | 80.7M | Some(offset) => offset, | 545 | 19.6k | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 19.6k | None => input.eof_offset(), | 549 | | }; | 550 | 80.7M | if offset == 0 { | 551 | 65.5M | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 15.2M | Ok(input.next_slice(offset)) | 554 | | } | 555 | 80.7M | } |
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.51k | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 1.51k | input: &mut I, | 538 | 1.51k | predicate: P, | 539 | 1.51k | ) -> Result<<I as Stream>::Slice, E> | 540 | 1.51k | where | 541 | 1.51k | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 1.51k | let offset = match input.offset_for(predicate) { | 544 | 1.47k | Some(offset) => offset, | 545 | 35 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 35 | None => input.eof_offset(), | 549 | | }; | 550 | 1.51k | if offset == 0 { | 551 | 3 | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 1.51k | Ok(input.next_slice(offset)) | 554 | | } | 555 | 1.51k | } |
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.51k | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 1.51k | input: &mut I, | 538 | 1.51k | predicate: P, | 539 | 1.51k | ) -> Result<<I as Stream>::Slice, E> | 540 | 1.51k | where | 541 | 1.51k | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 1.51k | let offset = match input.offset_for(predicate) { | 544 | 1.47k | Some(offset) => offset, | 545 | 35 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 35 | None => input.eof_offset(), | 549 | | }; | 550 | 1.51k | if offset == 0 { | 551 | 3 | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 1.51k | Ok(input.next_slice(offset)) | 554 | | } | 555 | 1.51k | } |
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.54k | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 3.54k | input: &mut I, | 538 | 3.54k | predicate: P, | 539 | 3.54k | ) -> Result<<I as Stream>::Slice, E> | 540 | 3.54k | where | 541 | 3.54k | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 3.54k | let offset = match input.offset_for(predicate) { | 544 | 3.49k | 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.54k | if offset == 0 { | 551 | 38 | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 3.50k | Ok(input.next_slice(offset)) | 554 | | } | 555 | 3.54k | } |
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 | 3.32M | fn take_till1<P, I: StreamIsPartial + Stream, E: ParserError<I>, const PARTIAL: bool>( | 537 | 3.32M | input: &mut I, | 538 | 3.32M | predicate: P, | 539 | 3.32M | ) -> Result<<I as Stream>::Slice, E> | 540 | 3.32M | where | 541 | 3.32M | P: Fn(I::Token) -> bool, | 542 | | { | 543 | 3.32M | let offset = match input.offset_for(predicate) { | 544 | 3.32M | Some(offset) => offset, | 545 | 826 | None if PARTIAL && input.is_partial() => { | 546 | 0 | return Err(ParserError::incomplete(input, Needed::new(1))); | 547 | | } | 548 | 826 | None => input.eof_offset(), | 549 | | }; | 550 | 3.32M | if offset == 0 { | 551 | 1.58k | Err(ParserError::from_input(input)) | 552 | | } else { | 553 | 3.32M | Ok(input.next_slice(offset)) | 554 | | } | 555 | 3.32M | } |
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> 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.10M | fn take_till_m_n<P, I, Error: ParserError<I>, const PARTIAL: bool>( |
558 | 4.10M | input: &mut I, |
559 | 4.10M | m: usize, |
560 | 4.10M | n: usize, |
561 | 4.10M | predicate: P, |
562 | 4.10M | ) -> Result<<I as Stream>::Slice, Error> |
563 | 4.10M | where |
564 | 4.10M | I: StreamIsPartial, |
565 | 4.10M | I: Stream, |
566 | 4.10M | P: Fn(I::Token) -> bool, |
567 | | { |
568 | 4.10M | 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.10M | } |
574 | | |
575 | 4.10M | let mut final_count = 0; |
576 | 68.9M | for (processed, (offset, token)) in input.iter_offsets().enumerate() { |
577 | 68.9M | if predicate(token) { |
578 | 1.81M | if processed < m { |
579 | 171k | return Err(ParserError::from_input(input)); |
580 | | } else { |
581 | 1.64M | return Ok(input.next_slice(offset)); |
582 | | } |
583 | | } else { |
584 | 67.1M | if processed == n { |
585 | 18.4k | return Ok(input.next_slice(offset)); |
586 | 67.1M | } |
587 | 67.1M | final_count = processed + 1; |
588 | | } |
589 | | } |
590 | 2.27M | 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.27M | if m <= final_count { |
603 | 884 | Ok(input.finish()) |
604 | | } else { |
605 | 2.27M | Err(ParserError::from_input(input)) |
606 | | } |
607 | | } |
608 | 4.10M | } 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 | 13.4k | fn take_till_m_n<P, I, Error: ParserError<I>, const PARTIAL: bool>( | 558 | 13.4k | input: &mut I, | 559 | 13.4k | m: usize, | 560 | 13.4k | n: usize, | 561 | 13.4k | predicate: P, | 562 | 13.4k | ) -> Result<<I as Stream>::Slice, Error> | 563 | 13.4k | where | 564 | 13.4k | I: StreamIsPartial, | 565 | 13.4k | I: Stream, | 566 | 13.4k | P: Fn(I::Token) -> bool, | 567 | | { | 568 | 13.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 | 13.4k | } | 574 | | | 575 | 13.4k | let mut final_count = 0; | 576 | 535k | for (processed, (offset, token)) in input.iter_offsets().enumerate() { | 577 | 535k | if predicate(token) { | 578 | 13.0k | if processed < m { | 579 | 300 | return Err(ParserError::from_input(input)); | 580 | | } else { | 581 | 12.7k | return Ok(input.next_slice(offset)); | 582 | | } | 583 | | } else { | 584 | 522k | if processed == n { | 585 | 162 | return Ok(input.next_slice(offset)); | 586 | 522k | } | 587 | 522k | 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 | 13.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_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> 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.09M | fn take_till_m_n<P, I, Error: ParserError<I>, const PARTIAL: bool>( | 558 | 4.09M | input: &mut I, | 559 | 4.09M | m: usize, | 560 | 4.09M | n: usize, | 561 | 4.09M | predicate: P, | 562 | 4.09M | ) -> Result<<I as Stream>::Slice, Error> | 563 | 4.09M | where | 564 | 4.09M | I: StreamIsPartial, | 565 | 4.09M | I: Stream, | 566 | 4.09M | P: Fn(I::Token) -> bool, | 567 | | { | 568 | 4.09M | 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.09M | } | 574 | | | 575 | 4.09M | let mut final_count = 0; | 576 | 68.4M | for (processed, (offset, token)) in input.iter_offsets().enumerate() { | 577 | 68.4M | if predicate(token) { | 578 | 1.80M | if processed < m { | 579 | 171k | return Err(ParserError::from_input(input)); | 580 | | } else { | 581 | 1.62M | return Ok(input.next_slice(offset)); | 582 | | } | 583 | | } else { | 584 | 66.6M | if processed == n { | 585 | 18.3k | return Ok(input.next_slice(offset)); | 586 | 66.6M | } | 587 | 66.6M | final_count = processed + 1; | 588 | | } | 589 | | } | 590 | 2.27M | 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.27M | if m <= final_count { | 603 | 880 | Ok(input.finish()) | 604 | | } else { | 605 | 2.27M | Err(ParserError::from_input(input)) | 606 | | } | 607 | | } | 608 | 4.09M | } |
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> |
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 | 82.3M | pub fn take_till<Set, Input, Error>( |
670 | 82.3M | occurrences: impl Into<Range>, |
671 | 82.3M | set: Set, |
672 | 82.3M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> |
673 | 82.3M | where |
674 | 82.3M | Input: StreamIsPartial + Stream, |
675 | 82.3M | Set: ContainsToken<<Input as Stream>::Token>, |
676 | 82.3M | Error: ParserError<Input>, |
677 | | { |
678 | | let Range { |
679 | 82.3M | start_inclusive, |
680 | 82.3M | end_inclusive, |
681 | 82.3M | } = occurrences.into(); |
682 | 82.3M | trace("take_till", move |i: &mut Input| { |
683 | 30.4M | match (start_inclusive, end_inclusive) { |
684 | | (0, None) => { |
685 | 27.0M | 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} |
687 | | } else { |
688 | 97.0M | 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 | 58.4M | 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.6M | 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} |
689 | | } |
690 | | } |
691 | | (1, None) => { |
692 | 3.32M | 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} |
694 | | } else { |
695 | 10.6M | 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 | 10.6M | 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} |
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} |
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} |
704 | | } |
705 | | } |
706 | | } |
707 | 30.4M | }) 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 | 23.7M | trace("take_till", move |i: &mut Input| { | 683 | 23.7M | match (start_inclusive, end_inclusive) { | 684 | | (0, None) => { | 685 | 23.7M | if <Input as StreamIsPartial>::is_partial_supported() { | 686 | 0 | take_till0::<_, _, _, true>(i, |c| set.contains_token(c)) | 687 | | } else { | 688 | 23.7M | 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 | 23.7M | }) |
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 | 6.65M | trace("take_till", move |i: &mut Input| { | 683 | 6.65M | match (start_inclusive, end_inclusive) { | 684 | | (0, None) => { | 685 | 3.32M | if <Input as StreamIsPartial>::is_partial_supported() { | 686 | 0 | take_till0::<_, _, _, true>(i, |c| set.contains_token(c)) | 687 | | } else { | 688 | 3.32M | take_till0::<_, _, _, false>(i, |c| set.contains_token(c)) | 689 | | } | 690 | | } | 691 | | (1, None) => { | 692 | 3.32M | if <Input as StreamIsPartial>::is_partial_supported() { | 693 | 0 | take_till1::<_, _, _, true>(i, |c| set.contains_token(c)) | 694 | | } else { | 695 | 3.32M | 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 | 6.65M | }) |
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 | 82.3M | } 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 | 75.7M | pub fn take_till<Set, Input, Error>( | 670 | 75.7M | occurrences: impl Into<Range>, | 671 | 75.7M | set: Set, | 672 | 75.7M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 673 | 75.7M | where | 674 | 75.7M | Input: StreamIsPartial + Stream, | 675 | 75.7M | Set: ContainsToken<<Input as Stream>::Token>, | 676 | 75.7M | Error: ParserError<Input>, | 677 | | { | 678 | | let Range { | 679 | 75.7M | start_inclusive, | 680 | 75.7M | end_inclusive, | 681 | 75.7M | } = occurrences.into(); | 682 | 75.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 | 75.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 | 6.66M | pub fn take_till<Set, Input, Error>( | 670 | 6.66M | occurrences: impl Into<Range>, | 671 | 6.66M | set: Set, | 672 | 6.66M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 673 | 6.66M | where | 674 | 6.66M | Input: StreamIsPartial + Stream, | 675 | 6.66M | Set: ContainsToken<<Input as Stream>::Token>, | 676 | 6.66M | Error: ParserError<Input>, | 677 | | { | 678 | | let Range { | 679 | 6.66M | start_inclusive, | 680 | 6.66M | end_inclusive, | 681 | 6.66M | } = occurrences.into(); | 682 | 6.66M | 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 | 6.66M | } |
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 | 1.70M | pub fn take_until<Literal, Input, Error>( |
910 | 1.70M | occurrences: impl Into<Range>, |
911 | 1.70M | literal: Literal, |
912 | 1.70M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> |
913 | 1.70M | where |
914 | 1.70M | Input: StreamIsPartial + Stream + FindSlice<Literal>, |
915 | 1.70M | Literal: Clone, |
916 | 1.70M | Error: ParserError<Input>, |
917 | | { |
918 | | let Range { |
919 | 1.70M | start_inclusive, |
920 | 1.70M | end_inclusive, |
921 | 1.70M | } = occurrences.into(); |
922 | 1.70M | trace("take_until", move |i: &mut Input| { |
923 | 144k | match (start_inclusive, end_inclusive) { |
924 | | (0, None) => { |
925 | 144k | if <Input as StreamIsPartial>::is_partial_supported() { |
926 | 0 | take_until0_::<_, _, _, true>(i, literal.clone()) |
927 | | } else { |
928 | 144k | 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 | 144k | }) 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 | 144k | trace("take_until", move |i: &mut Input| { | 923 | 144k | match (start_inclusive, end_inclusive) { | 924 | | (0, None) => { | 925 | 144k | if <Input as StreamIsPartial>::is_partial_supported() { | 926 | 0 | take_until0_::<_, _, _, true>(i, literal.clone()) | 927 | | } else { | 928 | 144k | 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 | 144k | }) |
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 | 1.70M | } 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 | 1.70M | pub fn take_until<Literal, Input, Error>( | 910 | 1.70M | occurrences: impl Into<Range>, | 911 | 1.70M | literal: Literal, | 912 | 1.70M | ) -> impl Parser<Input, <Input as Stream>::Slice, Error> | 913 | 1.70M | where | 914 | 1.70M | Input: StreamIsPartial + Stream + FindSlice<Literal>, | 915 | 1.70M | Literal: Clone, | 916 | 1.70M | Error: ParserError<Input>, | 917 | | { | 918 | | let Range { | 919 | 1.70M | start_inclusive, | 920 | 1.70M | end_inclusive, | 921 | 1.70M | } = occurrences.into(); | 922 | 1.70M | 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 | 1.70M | } |
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 | 144k | fn take_until0_<T, I, Error: ParserError<I>, const PARTIAL: bool>( |
951 | 144k | i: &mut I, |
952 | 144k | t: T, |
953 | 144k | ) -> Result<<I as Stream>::Slice, Error> |
954 | 144k | where |
955 | 144k | I: StreamIsPartial, |
956 | 144k | I: Stream + FindSlice<T>, |
957 | | { |
958 | 144k | match i.find_slice(t) { |
959 | 142k | Some(range) => Ok(i.next_slice(range.start)), |
960 | 1.30k | None if PARTIAL && i.is_partial() => Err(ParserError::incomplete(i, Needed::Unknown)), |
961 | 1.30k | None => Err(ParserError::from_input(i)), |
962 | | } |
963 | 144k | } 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 | 144k | fn take_until0_<T, I, Error: ParserError<I>, const PARTIAL: bool>( | 951 | 144k | i: &mut I, | 952 | 144k | t: T, | 953 | 144k | ) -> Result<<I as Stream>::Slice, Error> | 954 | 144k | where | 955 | 144k | I: StreamIsPartial, | 956 | 144k | I: Stream + FindSlice<T>, | 957 | | { | 958 | 144k | match i.find_slice(t) { | 959 | 142k | Some(range) => Ok(i.next_slice(range.start)), | 960 | 1.30k | None if PARTIAL && i.is_partial() => Err(ParserError::incomplete(i, Needed::Unknown)), | 961 | 1.30k | None => Err(ParserError::from_input(i)), | 962 | | } | 963 | 144k | } |
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> |
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} |
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} |
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> |
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 | 5.93k | pub fn rest<Input, Error>(input: &mut Input) -> Result<<Input as Stream>::Slice, Error> |
1048 | 5.93k | where |
1049 | 5.93k | Input: Stream, |
1050 | 5.93k | Error: ParserError<Input>, |
1051 | | { |
1052 | 5.93k | 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.73k | 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.19k | 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} |
1053 | 5.93k | } 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.73k | pub fn rest<Input, Error>(input: &mut Input) -> Result<<Input as Stream>::Slice, Error> | 1048 | 1.73k | where | 1049 | 1.73k | Input: Stream, | 1050 | 1.73k | Error: ParserError<Input>, | 1051 | | { | 1052 | 1.73k | trace("rest", move |input: &mut Input| Ok(input.finish())).parse_next(input) | 1053 | 1.73k | } |
winnow::token::rest::<&[u8], winnow::error::ErrMode<()>> Line | Count | Source | 1047 | 4.19k | pub fn rest<Input, Error>(input: &mut Input) -> Result<<Input as Stream>::Slice, Error> | 1048 | 4.19k | where | 1049 | 4.19k | Input: Stream, | 1050 | 4.19k | Error: ParserError<Input>, | 1051 | | { | 1052 | 4.19k | trace("rest", move |input: &mut Input| Ok(input.finish())).parse_next(input) | 1053 | 4.19k | } |
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 | | } |