Skip to content

Commit 1d7697a

Browse files
committed
deps: bump to memchr 2.6
This bumps the minimum memchr version to 2.6, which brings in massive improvements to aarch64 for single substring search. We also can now enable the new `alloc` feature in `memchr` when `alloc` is enable for `regex` and `regex-automata`. We also squash some warnings. [1]: BurntSushi/memchr#129
1 parent 2677aa0 commit 1d7697a

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ optional = true
168168

169169
# For skipping along search text quickly when a leading byte is known.
170170
[dependencies.memchr]
171-
version = "2.5.0"
171+
version = "2.6.0"
172172
optional = true
173173

174174
# For the actual regex engines.

fuzz/fuzz_targets/ast_fuzz_match.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ fuzz_target!(|data: FuzzData| -> Corpus {
2525
let _ = env_logger::try_init();
2626

2727
let pattern = format!("{}", data.ast);
28-
let Ok(re) = RegexBuilder::new(&pattern).size_limit(1<<20).build() else {
28+
let Ok(re) = RegexBuilder::new(&pattern).size_limit(1 << 20).build()
29+
else {
2930
return Corpus::Reject;
3031
};
31-
re.is_match(&data.haystack);
32-
re.find(&data.haystack);
33-
re.captures(&data.haystack).map_or(0, |c| c.len());
32+
let _ = re.is_match(&data.haystack);
33+
let _ = re.find(&data.haystack);
34+
let _ = re.captures(&data.haystack).map_or(0, |c| c.len());
3435
Corpus::Keep
3536
});

fuzz/fuzz_targets/ast_fuzz_match_bytes.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ fuzz_target!(|data: FuzzData| -> Corpus {
2525
let _ = env_logger::try_init();
2626

2727
let pattern = format!("{}", data.ast);
28-
let Ok(re) = RegexBuilder::new(&pattern).size_limit(1<<20).build() else {
28+
let Ok(re) = RegexBuilder::new(&pattern).size_limit(1 << 20).build()
29+
else {
2930
return Corpus::Reject;
3031
};
31-
re.is_match(&data.haystack);
32-
re.find(&data.haystack);
33-
re.captures(&data.haystack).map_or(0, |c| c.len());
32+
let _ = re.is_match(&data.haystack);
33+
let _ = re.find(&data.haystack);
34+
let _ = re.captures(&data.haystack).map_or(0, |c| c.len());
3435
Corpus::Keep
3536
});

regex-automata/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ internal-instrument-pikevm = ["logging", "std"]
8484
[dependencies]
8585
aho-corasick = { version = "1.0.0", optional = true, default-features = false }
8686
log = { version = "0.4.14", optional = true }
87-
memchr = { version = "2.5.0", optional = true, default-features = false }
87+
memchr = { version = "2.6.0", optional = true, default-features = false }
8888
regex-syntax = { path = "../regex-syntax", version = "0.7.4", optional = true, default-features = false }
8989

9090
[dev-dependencies]

0 commit comments

Comments
 (0)