// This is the exact same function, but its return type uses `impl Trait`.
// Look how much simpler it is!
This is the exact same function, but its return type uses `impl Trait`.
Look how much simpler it is!
This is the exact same function but its return type uses ` impl Trait ` . Look how much simpler it is!
fn combine_vecs(
    v: Vec<i32>,
    u: Vec<i32>,
) -> impl Iterator<Item=i32> {
    v.into_iter().chain(u.into_iter()).cycle()
}
fn combine_vecs ( v : Vec < i32 > , u : Vec < i32 > , ) -> impl Iterator < Item = i32 > { v . into_iter ( ) . chain ( u . into_iter ( ) ) . cycle ( ) }
This is the exact same function, but its return type uses `impl Trait`.
This is the exact same function but its return type uses ` impl Trait ` .
v
Vec<i32>
u
Vec<i32>