Is there a way to do something like this?
struct Foo {
bar: String,
baz: String
}
impl Foo {
fn run(&self) {
// magic syntax so that bar and baz are cloned?
//note, I do not want to clone all of Self, even if it were possible
let Self { bar, baz } = self;
pass(bar);
}
}
fn pass(s:String) {
}