MCPcopy Create free account
hub / github.com/douchuan/algorithm / visitor

Method visitor

src/strings/tst.rs:234–239  ·  view source on GitHub ↗
(p: Option<NonNull<Node<T>>>)

Source from the content-addressed store, hash-verified

232impl<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);

Callers

nothing calls this directly

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected