BurntSushi / memchr

Optimized string search routines for Rust.
The Unlicense
899 stars 102 forks source link

`Memchr<'_>` is no longer `Sync` from v2.6 #133

Closed Nugine closed 1 year ago

Nugine commented 1 year ago

Test code:

use memchr::memchr_iter;

pub fn assert_sync<T: Sync>(_: &T) {}

pub fn foo(input: &[u8]) {
    assert_sync(&memchr_iter(b'\n', input));
}

See also https://github.com/Nugine/s3s/issues/79

marregui commented 1 year ago

I am thinking this fix deserves a t-shirt

BurntSushi commented 1 year ago

This is fixed on crates.io in memchr 2.6.2.