Skip to main content

You can use the Option by-value iterator, move_iterthe Option by-value iterator, into_iter:

Some(2i2).move_iterinto_iter().chain(iter::range_step_inclusive(3i, max, 3..).step_by(2)) 

playpen

You can use the Option by-value iterator, move_iter:

Some(2i).move_iter().chain(iter::range_step_inclusive(3i, max, 2)) 

playpen

You can use the Option by-value iterator, into_iter:

Some(2).into_iter().chain((3..).step_by(2)) 
Source Link
huon
  • 103.4k
  • 24
  • 239
  • 230

You can use the Option by-value iterator, move_iter:

Some(2i).move_iter().chain(iter::range_step_inclusive(3i, max, 2)) 

playpen