Skip to content

Commit

Permalink
23524
Browse files Browse the repository at this point in the history
  • Loading branch information
bltavares committed Oct 31, 2015
1 parent 498a336 commit 354fb6b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/23524.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
enum Tree<K,V> {
Leaf(K, V),
Branch(u16, [Option<Box<Tree<K,V>>>]),
}

struct Node<T: ?Sized> {
population: u16,
children: T,
}

enum Tree2<K,V> {
Leaf(K, V),
Branch(Node<Tree<K,V>>),
}

fn main() {
use std::mem::size_of;
use std::sync::atomic;
println!("{:?}", size_of::<&Tree<(),()>>());
println!("{:?}", size_of::<&Tree2<(),()>>());
}

0 comments on commit 354fb6b

Please sign in to comment.