Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rluvaton committed Jan 19, 2025
1 parent ac19ec3 commit bbb0b7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arrow-string/src/binary_predicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ fn equals_bytes(lhs: &[u8], rhs: &[u8], byte_eq_kernel: impl Fn((&u8, &u8)) -> b
lhs.len() == rhs.len() && zip(lhs, rhs).all(byte_eq_kernel)
}

/// This is faster than `str::starts_with` for small strings.
/// This is faster than `[u8]::starts_with` for small slices.
/// See <https://github.com/apache/arrow-rs/issues/6107> for more details.
fn starts_with(
haystack: &[u8],
Expand All @@ -106,7 +106,7 @@ fn starts_with(
zip(haystack, needle).all(byte_eq_kernel)
}
}
/// This is faster than `str::ends_with` for small strings.
/// This is faster than `[u8]::ends_with` for small slices.
/// See <https://github.com/apache/arrow-rs/issues/6107> for more details.
fn ends_with(haystack: &[u8], needle: &[u8], byte_eq_kernel: impl Fn((&u8, &u8)) -> bool) -> bool {
if needle.len() > haystack.len() {
Expand Down

0 comments on commit bbb0b7f

Please sign in to comment.