Wouldn’t
- let result = f(world.0, params);
+ let result = f({ world }.0, params);
be a better-looking alternative approach to fix this (in the case of an FnOnce
like in your case)?
(Also, alternatively, the addition of the let _ = &world;
should be enough, you can still use the field then, no need to add an extra destructuring let
. Unless the same PR also wanted to make the code easier to understand that way or something like that.)