Comment Comment by bluejekyll I really like this advice, but aren’t these two examples the same, but yet different advice?// Good? for walrus in walruses { walrus.frobnicate() }Is essentially equivalent to// BAD for walrus in walruses { frobnicate(walrus) }And this is good,// GOOD frobnicate_batch(walruses)So should the first one really be something more like// impl FrobicateAll for &[Walrus] walruses.frobicate_all() parent bluejekyll 1 year ago
// Good? for walrus in walruses { walrus.frobnicate() }
Is essentially equivalent to
// BAD for walrus in walruses { frobnicate(walrus) }
And this is good,
// GOOD frobnicate_batch(walruses)
So should the first one really be something more like
// impl FrobicateAll for &[Walrus] walruses.frobicate_all()