diegovsky ,
@diegovsky@fosstodon.org avatar

@became_fish a result is a very lightweight type tbh. Its stack size is very negligible and you wouldn't need to do that. The compiler is smart enough to optimise that, so it likely compiles down to a single register, or it inlines the function.

If you insist on going that route, though, yes, &mut is the way.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines