After NLL: Moving from borrowed data and the sentinel pattern

from blog baby steps, | ↗ original
Continuing on with my “After NLL” series, I want to look at another common error that I see and its solution: today’s choice is about moves from borrowed data and the Sentinel Pattern that can be used to enable them. The problem Sometimes when we have &mut access to a struct, we have a need to temporarily take ownership of some of its fields....