O'Reilly logo
  • Ivan Zderadicka thinks this is interesting:

Whether the semantics of the closure is move or borrow does not really matter at that point.

From

Cover of Mastering Rust

Note

This is not exactly true I think - as we are returning the String, then outside_string has to move into closure - so closure is moving String aways into the closure.