Skip to content

Commit 902a2fc

Browse files
committed
Add #[inline] to number parsers where it was missing
1 parent a0fdad8 commit 902a2fc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/utils/src/parser/number.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ impl<'i, I: Integer + Parseable> Parser<'i> for NumberRange<I> {
113113
type Output = I;
114114
type Then<T: Parser<'i>> = Then2<Self, T>;
115115

116+
#[inline]
116117
fn parse(&self, input: &'i [u8]) -> ParseResult<'i, Self::Output> {
117118
let (v, remaining) = I::PARSER.parse(input)?;
118119
if v < self.min {
@@ -155,6 +156,7 @@ impl<'i> Parser<'i> for Digit {
155156
type Output = u8;
156157
type Then<T: Parser<'i>> = Then2<Self, T>;
157158

159+
#[inline]
158160
fn parse(&self, input: &'i [u8]) -> ParseResult<'i, Self::Output> {
159161
if let Some(d @ b'0'..=b'9') = input.first() {
160162
Ok((d - b'0', &input[1..]))

0 commit comments

Comments
 (0)