fn push(Self { ref mut items, .. }: Self) { .. }
takes Self by value (and makes it an associated function). I’m suggesting that the semantics are changed to only take a mutable view of ‘items’. This would also need a way of attaching a lifetime to the borrow as well…
fn push(Self { ref mut items, .. }: Self) { .. }
takes Self by value (and makes it an associated function). I’m suggesting that the semantics are changed to only take a mutable view of ‘items’. This would also need a way of attaching a lifetime to the borrow as well…
fn add_successful(Self { ref mut successful, .. }: self) {
*successful += 1;
}
fn add_successful(Self { ref mut successful, .. }: self) {
*successful += 1;
}