mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
16 lines
242 B
Rust
16 lines
242 B
Rust
pub struct BTree<V> {
|
|
pub node: TreeItem<V>,
|
|
}
|
|
|
|
pub enum TreeItem<V> {
|
|
TreeLeaf { value: V },
|
|
}
|
|
|
|
pub fn leaf<V>(value: V) -> TreeItem<V> {
|
|
TreeItem::TreeLeaf { value: value }
|
|
}
|
|
|
|
fn main() {
|
|
BTree::<isize> { node: leaf(1) };
|
|
}
|