(&mut self)
| 231 | |
| 232 | impl<T> Drop for TST<T> { |
| 233 | fn drop(&mut self) { |
| 234 | fn visitor<T>(p: Option<NonNull<Node<T>>>) { |
| 235 | if let Some(p) = p { |
| 236 | let subtries = unsafe { Box::from_raw(p.as_ptr()).subtries }; |
| 237 | subtries.iter().for_each(|it| visitor(*it)); |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | let root = self.root.take(); |
| 242 | visitor(root); |
| 243 | self.n = 0; |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | impl<T> Node<T> { |
nothing calls this directly
no outgoing calls
no test coverage detected