DEV Community

Discussion on: Structs in Rust

Collapse
 
francescoxx profile image
Francesco Ciulla

There are different ways to avoid this (I explain it in the video but I didn't want to make the article too long). you can either clone() the single propery or even clone the whole instance adding the clone trait to the struct