(&self)
| 98 | /// Increment strong count |
| 99 | #[inline] |
| 100 | pub fn inc(&self) { |
| 101 | let val = State::from_raw(self.state.fetch_add(COUNT, Ordering::Relaxed)); |
| 102 | if val.destructed() || (val.strong() as usize) > STRONG - 1 { |
| 103 | refcount_overflow(); |
| 104 | } |
| 105 | if val.strong() == 0 { |
| 106 | // The previous fetch_add created a permission to run decrement again |
| 107 | self.state.fetch_add(COUNT, Ordering::Relaxed); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | #[inline] |
| 112 | pub fn inc_by(&self, n: usize) { |
no test coverage detected