We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7aba3a2 commit 5b32695Copy full SHA for 5b32695
src/x86.rs
@@ -416,8 +416,8 @@ impl<N: Needle> Avx2Searcher<N> {
416
#[inline]
417
#[target_feature(enable = "avx2")]
418
pub unsafe fn inlined_search_in(&self, haystack: &[u8]) -> bool {
419
- if haystack.len() < self.needle.size() {
420
- return false;
+ if haystack.len() <= self.needle.size() {
+ return haystack == self.needle.as_bytes();
421
}
422
423
self.avx2_search_in(haystack)
0 commit comments