(capacity: usize)
| 56 | } |
| 57 | |
| 58 | fn with_capacity(capacity: usize) -> Self { |
| 59 | // Include the virtual root. |
| 60 | let mut nodes = Vec::with_capacity(capacity + 1); |
| 61 | nodes.push(Default::default()); |
| 62 | Self { nodes } |
| 63 | } |
| 64 | |
| 65 | fn len(&self) -> usize { |
| 66 | self.nodes.len() |