How to return an Iterator with associated type being generic from a function?

后端 未结 0 704
清歌不尽
清歌不尽 2020-11-30 01:59

for a function like this

fn generate_even(a: i32, b: i32) -> impl Iterator {
  (a..b).filter(|x| x % 2 == 0)
}

I want to

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