deps: update to thread_local 1.0
Before adoption: this commit came in with the history the project adopted, so no landing records it.
We also update the pcre2 and regex dependencies, which removes any other lingering uses of thread_local 0.3.
authored by Andrew Gallant · committed by Andrew Gallant · parent bd7a426 · Browse files · 6 files·+23 added−23 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+23 added−23 removed
- other:+23 added−23 removed
Provenance
- Commit
cb2f6dd- Tree
0cb0fcd- Author
Andrew Gallant <jamslam@gmail.com>- Committer
Andrew Gallant <jamslam@gmail.com>- Parent
bd7a426
6 files changed+23 added−23 removed
modified:grep-regex/src/word.rs+1 added-1 removed
76 unmodified lines77 // the fact, but that's a bit harder to get right, and it's not clear78 // if it's worth it.79 80 let cell = self.locs.get_or(|| {81- Box::new(RefCell::new(self.regex.capture_locations()))81+ RefCell::new(self.regex.capture_locations())82 });83 let mut caps = cell.borrow_mut();84 self.regex.captures_read_at(&mut caps, haystack, at);85 Ok(caps.get(1).map(|m| Match::new(m.0, m.1)))118 unmodified linesmodified:grep-regex/Cargo.toml+1 added-1 removed
16 unmodified lines17181920212116 unmodified linesgrep-matcher = { version = "0.1.2", path = "../grep-matcher" }log = "0.4.5"regex = "1.1"regex-syntax = "0.6.5"thread_local = "0.3.6"thread_local = "1"modified:ignore/src/gitignore.rs+1 added-1 removed
247 unmodified lines248 if self.is_empty() {249 return Match::None;250 }251 let path = path.as_ref();252- let _matches = self.matches.as_ref().unwrap().get_default();252+ let _matches = self.matches.as_ref().unwrap().get_or_default();253 let mut matches = _matches.borrow_mut();254 let candidate = Candidate::new(path);255 self.set.matches_candidate_into(&candidate, &mut *matches);256 for &i in matches.iter().rev() {531 unmodified linesmodified:ignore/src/types.rs+1 added-1 removed
513 unmodified lines514 None => {515 return Match::None;516 }517 };518- let mut matches = self.matches.get_default().borrow_mut();518+ let mut matches = self.matches.get_or_default().borrow_mut();519 self.set.matches_into(name, &mut *matches);520 // The highest precedent match is the last one.521 if let Some(&i) = matches.last() {522 let (isel, iglob) = self.glob_to_selection[i];292 unmodified linesmodified:ignore/Cargo.toml+1 added-1 removed
23 unmodified lines242526272828293031323 unmodified lines23 unmodified lineslog = "0.4.5"memchr = "2.1"regex = "1.1"same-file = "1.0.4"thread_local = "0.3.6"thread_local = "1"walkdir = "2.2.7"
[target.'cfg(windows)'.dependencies.winapi-util]version = "0.1.2"3 unmodified linesmodified:Cargo.lock+18 added-18 removed
125 unmodified lines126 "bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",127 "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",128 "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",129 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",130- "regex 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",130+ "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",131 ]132 133 [[package]]134 name = "grep"17 unmodified lines152 "bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",153 "globset 0.4.4",154 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",155 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",156- "regex 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",156+ "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",157 "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",158 "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",159 "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",160 ]2 unmodified lines163 name = "grep-matcher"164 version = "0.1.3"165 dependencies = [166 "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",167- "regex 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",167+ "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",168 ]169 170 [[package]]171 name = "grep-pcre2"172 version = "0.1.3"173 dependencies = [174 "grep-matcher 0.1.3",175- "pcre2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",175+ "pcre2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",176 ]177 178 [[package]]179 name = "grep-printer"16 unmodified lines196 dependencies = [197 "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",198 "grep-matcher 0.1.3",199 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",200- "regex 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",200+ "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",201 "regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",202- "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",202+ "thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",203 ]204 205 [[package]]206 name = "grep-searcher"6 unmodified lines213 "grep-matcher 0.1.3",214 "grep-regex 0.1.5",215 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",216 "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",217- "regex 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",217+ "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",218 ]219 220 [[package]]221 name = "hermit-abi"11 unmodified lines233 "globset 0.4.4",234 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",235 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",236 "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",237- "regex 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",237+ "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",238 "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",239- "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",239+ "thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",240 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",241 "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",242 ]243 71 unmodified lines315 ]316 317 [[package]]318 name = "pcre2"319-version = "0.2.2"319+version = "0.2.3"320 source = "registry+https://github.com/rust-lang/crates.io-index"321 dependencies = [322 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",323 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",324 "pcre2-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",325- "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",325+ "thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",326 ]327 328 [[package]]329 name = "pcre2-sys"27 unmodified lines357 ]358 359 [[package]]360 name = "regex"361-version = "1.3.2"361+version = "1.3.3"362 source = "registry+https://github.com/rust-lang/crates.io-index"363 dependencies = [364 "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",365 "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",366 "regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",367- "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",367+ "thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",368 ]369 370 [[package]]371 name = "regex-automata"19 unmodified lines391 "jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",392 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",393 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",394 "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)",395- "regex 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",395+ "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",396 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",397 "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",398 "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",399 "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",69 unmodified lines469 ]470 471 [[package]]472 name = "thread_local"473-version = "0.3.6"473+version = "1.0.0"474 source = "registry+https://github.com/rust-lang/crates.io-index"475 dependencies = [476 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",477 ]82 unmodified lines560 "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"561 "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"562 "checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72"563 "checksum packed_simd 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a85ea9fc0d4ac0deb6fe7911d38786b32fc11119afd9e9d38b84ff691ce64220"564-"checksum pcre2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0877c47282ec40b24fcd9c84781798d02a6409f9c9b082658c31f070f4c16442"564+"checksum pcre2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "85b30f2f69903b439dd9dc9e824119b82a55bf113b29af8d70948a03c1b11ab1"565 "checksum pcre2-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "876c72d05059d23a84bd9fcdc3b1d31c50ea7fe00fe1522b4e68cd3608db8d5b"566 "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"567 "checksum proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0319972dcae462681daf4da1adeeaa066e3ebd29c69be96c6abb1259d2ee2bcc"568 "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"569-"checksum regex 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e132dca7dca8da635b3bd4a42abf254bcf8b2c0658e883fed61cefb87b3635ab"569+"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87"570 "checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9"571 "checksum regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e734e891f5b408a29efbf8309e656876276f49ab6a6ac208600b4419bd893d90"572 "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"573 "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421"3 unmodified lines577 "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"578 "checksum syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4ff033220a41d1a57d8125eab57bf5263783dfdcc18688b1dacc6ce9651ef8"579 "checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e"580 "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"581-"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"581+"checksum thread_local 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "88ddf1ad580c7e3d1efff877d972bcc93f995556b9087a5a259630985c88ceab"582 "checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"583 "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"584 "checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e"585 "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"4 unmodified lines