Skip to content

Commit 9a505a1

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 15cdc64 commit 9a505a1

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ std = [
5252
# to actually emit the log messages somewhere.
5353
logging = [
5454
"aho-corasick?/logging",
55+
"memchr?/logging",
5556
"regex-automata/logging",
5657
]
5758
# The 'use_std' feature is DEPRECATED. It will be removed in regex 2. Until
@@ -167,7 +168,7 @@ optional = true
167168

168169
# For skipping along search text quickly when a leading byte is known.
169170
[dependencies.memchr]
170-
version = "2.5.0"
171+
version = "2.6.0"
171172
optional = true
172173

173174
# 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ bench = false
2121
default = ["std", "syntax", "perf", "unicode", "meta", "nfa", "dfa", "hybrid"]
2222
std = ["regex-syntax?/std", "memchr?/std", "aho-corasick?/std", "alloc"]
2323
alloc = []
24-
logging = ["dep:log", "aho-corasick?/logging"]
24+
logging = ["dep:log", "aho-corasick?/logging", "memchr?/logging"]
2525

2626
syntax = ["dep:regex-syntax", "alloc"]
2727

@@ -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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy