From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/string_cache/src/atom.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'vendor/string_cache/src/atom.rs') 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 Atom { } impl Atom { - /// 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> for Atom { phantom: PhantomData, } } else { - let ptr: std::ptr::NonNull = - DYNAMIC_SET.lock().insert(string_to_add, hash.g); + let ptr: std::ptr::NonNull = 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 Drop for Atom { // Out of line to guide inlining. fn drop_slow(this: &mut Atom) { - DYNAMIC_SET - .lock() - .remove(this.unsafe_data.get() as *mut Entry); + DYNAMIC_SET.remove(this.unsafe_data.get() as *mut Entry); } } } -- cgit v1.2.3