(&self)
| 213 | } |
| 214 | |
| 215 | fn max(&self) -> (Option<&T>, Option<&U>) { |
| 216 | // 最大值一定在最右侧 |
| 217 | match &self.right { |
| 218 | Some(node) => node.max(), |
| 219 | None => match &self.key { |
| 220 | Some(key) => (Some(&key), self.val.as_ref()), |
| 221 | None => (None, None), |
| 222 | }, |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | // 获取左右子节点 |
| 227 | fn get_left(&self) -> Link<T,U> { |
no outgoing calls
no test coverage detected