Closed MaikKlein closed 6 years ago
SlotMap
implements the Clone
trait. So your example is simply:
let mut create: SlotMap<CreateFoo> = SlotMap::new();
let key = create.insert(something);
let foo_map: SlotMap<Foo> = create.clone(); // reuse the keys from `create`
foo_map.get(key); // should work
For example:
Is something like this currently possible?