}
}
-pub fn shape_edges(shape: &Shape) -> impl Iterator<Item=[Point; 2]> + '_ {
+pub fn shape_edges(shape: &Shape)
+ -> impl Iterator<Item=[Point; 2]> + Clone + '_
+{
shape
.iter()
.cycle()
if do_flip { MAX-c } else { c }
}
-pub fn shape_all_flippings(shape: &Shape) -> impl Iterator<Item=Shape> + '_ {
+pub fn shape_all_flippings(shape: &Shape)
+ -> impl Iterator<Item=Shape> + Clone + '_
+{
iter::repeat([false,true].into_iter())
.take(DIM)
.multi_cartesian_product()
})
}
-pub fn shape_all_rotations(shape: &Shape) -> impl Iterator<Item=Shape> + '_ {
+pub fn shape_all_rotations(shape: &Shape)
+ -> impl Iterator<Item=Shape> + Clone + '_
+{
Itertools::cartesian_product(
0..DIM,
[false,true],