MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / BinaryTree

Class BinaryTree

code/chapter07/binary_tree.rs:10–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8// left 和 right 保存左右子节点链接
9#[derive(Debug, Clone)]
10struct BinaryTree<T> {
11 key: T,
12 left: Link<T>,
13 right: Link<T>,
14}
15
16impl<T: Clone + Debug> BinaryTree<T> {
17 fn new(key: T) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected