Re:JDK 10: General Availability
by andrewaylett on Wednesday March 21, 2018 @10:28AM
(#16638238)
If the transformation function consumes p, rather than taking a reference to it, Rust will stop you from using the variable again afterwards.
What would help is splitting the function up so that you don't have multiple named variables representing multiple versions of the same thing in the same scope: