orlp / slotmap

Slotmap data structure for Rust
zlib License
1.16k stars 70 forks source link

Added clone_from implementations for all slotmaps #59

Closed Buzzec closed 3 years ago

Buzzec commented 3 years ago

#[derive(Clone)] does not provide a clone_from implementation, only clone. This PR adds the clone_from implementations to increase performance where this function can be used. All relevant slots also received implementations because that's where the data is actually stored.