pub struct ColorSource<C: Clone>(Vec<C>);
impl<C: Clone> ColorSource<C> {
#[must_use]
pub fn new(colors: Vec<C>) -> Self {
Self(colors)
}
#[must_use]
pub fn next_color(&mut self) -> C {
let color = self.0.remove(0);
self.0.push(color.clone());
color
}
}