3 ms·
You can work-around that by capturing the fields you need individually. It's a little awkward but does let you express what you're trying to do there: https://
by vvanders 9y ago
You can work-around that by capturing the fields you need individually. It's a little awkward but does let you express what you're trying to do there:
https://play.rust-lang.org/?gist=2463ff559d7f96f916d246272b19ff68&version=stable https://play.rust-lang.org/?gist=2463ff559d7f96f916d246272b1...
Agreed that it's not the best default behavior though. Generally I tend to try to keep unrelated things in separate structs for this reason(with the nice side benefit of keeping concerns separate).