Skip shrink when it doesn't save anything (#17405)

This commit is contained in:
sakridge
2021-06-02 09:51:46 +02:00
committed by GitHub
parent 10c6e771b5
commit 14c52ab018
2 changed files with 151 additions and 56 deletions

View File

@@ -146,6 +146,10 @@ impl<T: Clone> ReadAccountMapEntry<T> {
pub fn unref(&self) {
self.ref_count().fetch_sub(1, Ordering::Relaxed);
}
pub fn addref(&self) {
self.ref_count().fetch_add(1, Ordering::Relaxed);
}
}
#[self_referencing]