You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, it's useful to derive Clone for types with fields that cannot be cloned, and need to be re-initialized:
#[derive_where(Clone,Debug)]structFoo{// Defaults to `Option::<TcpStream>::default()` on clone#[derive_where(skip(Clone))]connection:Option<TcpStream>,s:String,#[derive_where(skip(Debug))]i:i32,}
Alternatively maybe #[derive_where(default(Clone))] makes more sense here.
The text was updated successfully, but these errors were encountered:
Sometimes, it's useful to derive
Clone
for types with fields that cannot be cloned, and need to be re-initialized:Alternatively maybe
#[derive_where(default(Clone))]
makes more sense here.The text was updated successfully, but these errors were encountered: