twoway crate is unmaintained
Closed this issue · 3 comments
rillian commented
The twoway
crate used for fast string matching was recently marked as unmaintained. It would be good to migrate away to avoid triggering audit warnings.
The (former) maintainers recommend using memchr
but at first glance that supports byte slices but has no equivalent to twoway::find_str
, so in practice it may need to be some combination of std::str::find
and mem(r)chr
with byte string literals and .as_bytes()
whichever benchmarks better.
wknapik commented
When closing this, please also close brave/brave-browser#28228 (but not before the fix is present on all release branches, or the issue will be automatically reopened).
antonok-edm commented
Just noting that memchr
does have memmem
for substring find.
rillian commented
🙏