|
|
|
|
|
by edflsafoiewq
2123 days ago
|
|
Just let x = &mut bar.0 will work, but this "intelligence" is confined to the body of a single function. Rust possesses the somewhat curious property that there are functions that are intended to always be called like this foo(&bar.x, &bar.y, &bar.z)
which cannot be refactored to foo(&bar)
|
|
This is also why it's okay in the body of a single function; that doesn't impact a boundary.
We'll see what happens in the future.