Skip to content

Commit

Permalink
test inlining split_at_position (#1740)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed May 5, 2024
1 parent fa23298 commit cdd8baf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ impl<'a> Input for &'a [u8] {
}
}

#[inline(always)]
fn split_at_position<P, E: ParseError<Self>>(&self, predicate: P) -> IResult<Self, Self, E>
where
P: Fn(Self::Item) -> bool,
Expand All @@ -250,6 +251,7 @@ impl<'a> Input for &'a [u8] {
}
}

#[inline(always)]
fn split_at_position1<P, E: ParseError<Self>>(
&self,
predicate: P,
Expand Down Expand Up @@ -278,6 +280,7 @@ impl<'a> Input for &'a [u8] {
}
}

#[inline(always)]
fn split_at_position1_complete<P, E: ParseError<Self>>(
&self,
predicate: P,
Expand All @@ -300,6 +303,7 @@ impl<'a> Input for &'a [u8] {
}

/// mode version of split_at_position
#[inline(always)]
fn split_at_position_mode<OM: crate::OutputMode, P, E: ParseError<Self>>(
&self,
predicate: P,
Expand All @@ -323,6 +327,7 @@ impl<'a> Input for &'a [u8] {
}

/// mode version of split_at_position
#[inline(always)]
fn split_at_position_mode1<OM: crate::OutputMode, P, E: ParseError<Self>>(
&self,
predicate: P,
Expand Down Expand Up @@ -408,6 +413,7 @@ impl<'a> Input for &'a str {
Err(Needed::Unknown)
}

#[inline(always)]
fn split_at_position<P, E: ParseError<Self>>(&self, predicate: P) -> IResult<Self, Self, E>
where
P: Fn(Self::Item) -> bool,
Expand All @@ -419,6 +425,7 @@ impl<'a> Input for &'a str {
}
}

#[inline(always)]
fn split_at_position1<P, E: ParseError<Self>>(
&self,
predicate: P,
Expand All @@ -435,6 +442,7 @@ impl<'a> Input for &'a str {
}
}

#[inline(always)]
fn split_at_position_complete<P, E: ParseError<Self>>(
&self,
predicate: P,
Expand All @@ -455,6 +463,7 @@ impl<'a> Input for &'a str {
}
}

#[inline(always)]
fn split_at_position1_complete<P, E: ParseError<Self>>(
&self,
predicate: P,
Expand Down Expand Up @@ -484,6 +493,7 @@ impl<'a> Input for &'a str {
}

/// mode version of split_at_position
#[inline(always)]
fn split_at_position_mode<OM: crate::OutputMode, P, E: ParseError<Self>>(
&self,
predicate: P,
Expand Down Expand Up @@ -516,6 +526,7 @@ impl<'a> Input for &'a str {
}

/// mode version of split_at_position
#[inline(always)]
fn split_at_position_mode1<OM: crate::OutputMode, P, E: ParseError<Self>>(
&self,
predicate: P,
Expand Down

0 comments on commit cdd8baf

Please sign in to comment.