about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authornham <hamann.nick@gmail.com>2014-08-19 15:20:51 -0400
committernham <hamann.nick@gmail.com>2014-08-20 02:51:22 -0400
commit9419e9265950a16f873dbed49c715fd7ea4e08e7 (patch)
tree5e0cde488f12bf4c89d7776390977b6a352b2020 /src/rustllvm/RustWrapper.cpp
parent3f5d0b5b6cd4994c719d57a778697124348a4c1c (diff)
downloadrust-9419e9265950a16f873dbed49c715fd7ea4e08e7.tar.gz
rust-9419e9265950a16f873dbed49c715fd7ea4e08e7.zip
Fix TwoWaySearcher to work when used with periodic needles.
There is a check in TwoWaySearcher::new to determine whether the needle
is periodic. This is needed because during searching when a match fails,
we cannot advance the position by the entire length of the needle when
it is periodic, but can only advance by the length of the period.

The reason "bananas".contains("nana") (and similar searches) were
returning false was because the periodicity check was wrong.

Closes #16589
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions