1 2 3 4 5 6 7 8 9 10 11 12 13 14
use crate::prelude::Alternative; impl<'a, A> Alternative<'a, A> for Vec<A> where A: Clone + 'a, { fn empty() -> Self { Vec::new() } fn otherwise(self, other: Self) -> Self { self.into_iter().chain(other.into_iter()).collect() } }