Skip to content

Commit

Permalink
deps: update to thread_local 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BurntSushi committed Jan 10, 2020
1 parent ab5d913 commit f6f8276
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
1.3.3 (2020-01-09)
==================
This is a small maintenance release that upgrades the dependency on
`thread_local` from `0.3` to `1.0`. The minimum supported Rust version remains
at Rust 1.28.


1.3.2 (2020-01-09)
==================
This is a small maintenance release with some house cleaning and bug fixes.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ optional = true

# For managing regex caches quickly across multiple threads.
[dependencies.thread_local]
version = "0.3.6"
version = "1"
optional = true

# For parsing regular expressions.
Expand Down
2 changes: 1 addition & 1 deletion src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod imp {
}

pub fn get_or(&self, create: impl FnOnce() -> T) -> CachedGuard<T> {
CachedGuard(self.0.get_or(|| Box::new(create())))
CachedGuard(self.0.get_or(|| create()))
}
}

Expand Down

0 comments on commit f6f8276

Please sign in to comment.