Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test inlining split_at_position #1740

Merged
merged 5 commits into from
May 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/traits.rs
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