Clears the contents of `self` even if it's so deep that simply dropping it would cause a stack overflow in `drop_in_place`. Leaves `self` in an unusable state, so this should only be used if `self` is about to be dropped or otherwise overwritten.
(&mut self)
| 1945 | /// Leaves `self` in an unusable state, so this should only be used if `self` is about to be |
| 1946 | /// dropped or otherwise overwritten. |
| 1947 | pub fn destroy_carefully(&mut self) { |
| 1948 | let mut todo = vec![self.take_dangerous()]; |
| 1949 | while let Some(mut expr) = todo.pop() { |
| 1950 | for child in expr.children_mut() { |
| 1951 | todo.push(child.take_dangerous()); |
| 1952 | } |
| 1953 | } |
| 1954 | } |
| 1955 | |
| 1956 | /// Computes the size (total number of nodes) and maximum depth of a MirRelationExpr for |
| 1957 | /// debug printing purposes. |
no test coverage detected