3 ms·
This struct doesn't compile: recursive type `BinaryTree` has infinite size
by m1el 10y ago
This struct doesn't compile:
recursive type `BinaryTree` has infinite size
- steveklabnik 10y agoSimplest solution: enum BinaryTree { Leaf(i32), Node(Box<BinaryTree>, Box<BinaryTree>) }
- winstonewert 10y agoMy bad. In my actual code I was thinking of it was a Vec<>, because my nodes aren't binary.