copy+clone for handle

This commit is contained in:
janis 2025-09-17 14:04:37 +02:00
parent 5e1a4a245a
commit c2cecdf85f
Signed by: janis
SSH key fingerprint: SHA256:bB1qbbqmDXZNT0KKD5c2Dfjg53JGhj7B3CFcLIzSqq8

View file

@ -79,6 +79,13 @@ pub(crate) struct Handle<Node, Type> {
_marker: PhantomData<Type>,
}
impl<Node: Copy, Type> Copy for Handle<Node, Type> {}
impl<Node: Copy, Type> Clone for Handle<Node, Type> {
fn clone(&self) -> Self {
*self
}
}
impl<'a, K: 'a, V: 'a> Copy for NodeRef<marker::Immut<'a>, K, V> {}
impl<'a, K: 'a, V: 'a> Clone for NodeRef<marker::Immut<'a>, K, V> {
fn clone(&self) -> Self {