about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-23 18:00:59 +0000
committerbors <bors@rust-lang.org>2014-08-23 18:00:59 +0000
commit03fd90be459650160a4edefbc78588a938db2f8c (patch)
treeaba5af2841c7862a894de3bff3e65ef7206336d6 /src/rustllvm/RustWrapper.cpp
parent3e3209ab4a7e256730d7c6733f2d800a5dbfdaef (diff)
parent9a43492f59bfc38ed819e361c3cf99aa7b972e15 (diff)
downloadrust-03fd90be459650160a4edefbc78588a938db2f8c.tar.gz
rust-03fd90be459650160a4edefbc78588a938db2f8c.zip
auto merge of #16612 : nham/rust/twoway_searcher_fix, r=alexcrichton
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

Also, thanks to @Gankro, who came up with many buggy examples.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions