Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
tunz committed Dec 20, 2022
1 parent 804d2ae commit f91468f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boa_profiler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//! [boa-web]: https://boa-dev.github.io/
//! [boa-playground]: https://boa-dev.github.io/boa/playground/
#![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![cfg_attr(not(any(test, feature = "profiler")), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)]
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
Expand Down Expand Up @@ -128,7 +128,8 @@ impl Profiler {
}
}
let mut cache = self.string_cache.write().unwrap();
match cache.entry(s.into()) {
let entry = cache.entry(s.into());
match entry {
Entry::Occupied(entry) => *entry.get(),
Entry::Vacant(entry) => {
let id = self.profiler.alloc_string(s);
Expand Down

0 comments on commit f91468f

Please sign in to comment.