arendjr,

The composability doesn’t have much to do with whether it’s a reference or a move, it’s because it bypasses usage of the Iterator methods. Iterators chains can consist of filter, map and other operations, which allows various functions and/or closures to be composed together. Whereas with retain_mut() there isn’t really a chain and functions you may otherwise use in an iterator chain become harder to (re)use.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust@programming.dev
  • DreamBathrooms
  • InstantRegret
  • GTA5RPClips
  • magazineikmin
  • thenastyranch
  • rosin
  • Youngstown
  • tacticalgear
  • slotface
  • ngwrru68w68
  • Durango
  • kavyap
  • khanakhh
  • osvaldo12
  • JUstTest
  • everett
  • cubers
  • mdbf
  • cisconetworking
  • tester
  • normalnudes
  • anitta
  • ethstaker
  • modclub
  • megavids
  • provamag3
  • Leos
  • lostlight
  • All magazines