diff options
Diffstat (limited to 'vendor/string_cache/src/atom.rs')
-rw-r--r-- | vendor/string_cache/src/atom.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/vendor/string_cache/src/atom.rs b/vendor/string_cache/src/atom.rs index c02651b31..321b0a40e 100644 --- a/vendor/string_cache/src/atom.rs +++ b/vendor/string_cache/src/atom.rs @@ -105,7 +105,7 @@ impl<Static> Atom<Static> { } impl<Static: StaticAtomSet> Atom<Static> { - /// Return the internal repersentation. For testing. + /// Return the internal representation. For testing. #[doc(hidden)] pub fn unsafe_data(&self) -> u64 { self.unsafe_data.get() @@ -200,8 +200,7 @@ impl<'a, Static: StaticAtomSet> From<Cow<'a, str>> for Atom<Static> { phantom: PhantomData, } } else { - let ptr: std::ptr::NonNull<Entry> = - DYNAMIC_SET.lock().insert(string_to_add, hash.g); + let ptr: std::ptr::NonNull<Entry> = DYNAMIC_SET.insert(string_to_add, hash.g); let data = ptr.as_ptr() as u64; debug_assert!(0 == data & TAG_MASK); Atom { @@ -237,9 +236,7 @@ impl<Static> Drop for Atom<Static> { // Out of line to guide inlining. fn drop_slow<Static>(this: &mut Atom<Static>) { - DYNAMIC_SET - .lock() - .remove(this.unsafe_data.get() as *mut Entry); + DYNAMIC_SET.remove(this.unsafe_data.get() as *mut Entry); } } } |