(&self, cc: &Collection)
| 246 | |
| 247 | unsafe impl Collect for InternedDynStringsInner<'_> { |
| 248 | fn trace(&self, cc: &Collection) { |
| 249 | // SAFETY: No new Gc pointers are adopted or reparented. |
| 250 | let mut dyn_strings = unsafe { self.0.unlock_unchecked() }.borrow_mut(); |
| 251 | unsafe { |
| 252 | for bucket in dyn_strings.iter() { |
| 253 | let s = bucket.as_ref().0; |
| 254 | if s.is_dropped(cc) { |
| 255 | // SAFETY: it is okay to erase items yielded by the iterator. |
| 256 | dyn_strings.erase(bucket); |
| 257 | } else { |
| 258 | s.trace(cc); |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | impl<'gc> InternedDynStrings<'gc> { |
nothing calls this directly
no test coverage detected