[<<][rust][>>][..]
Fri Mar 23 13:11:11 EDT 2018

impl Trait


https://www.reddit.com/r/rust/comments/86f3h6/impl_trait_stabilization_was_just_rd/

https://aturon.github.io/blog/2015/09/28/impl-trait/

I ran into this exactly with Lars: iterators getting hairy

  The basic idea is to allow code like the following:

  pub fn produce_iter_static() -> impl Iterator<u8> {
      (0..10u8).rev().map(|x| x * 2).skip(2)
  }

  The point here is to avoid writing a return type like

  iter::Skip<iter::Map<'static,u8,u8,iter::Rev<iter::Range<u8>>>>

https://github.com/rust-lang/rust/issues/44721



[Reply][About]
[<<][rust][>>][..]