Why the closure passed to map() does not take a reference while the one passed to filter() takes a reference?

后端 未结 0 1772
野趣味
野趣味 2021-01-18 06:08

The closure passed to map() does not take a reference while the one passed to filter() takes a reference in Rust. Most of the iterator adapters take a reference. Is there an

相关标签:
回答
  • 消灭零回复
提交回复
热议问题