From: Ian Jackson Date: Sat, 29 Oct 2022 21:35:06 +0000 (+0100) Subject: Revert "edges in other order" X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=f6686e040ea95561bab507cb3074b9b81929ca0f;p=z3-treefoil Revert "edges in other order" This reverts commit 8a44d2efe9db7ce76c33d5d28fe10af5b60ba7cb. Signed-off-by: Ian Jackson --- diff --git a/src/lib.rs b/src/lib.rs index 58bbc56..06566d8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,7 @@ pub use std::io; pub use std::io::Write as _; pub use std::iter; -pub use itertools::{chain, izip}; +pub use itertools::izip; pub use itertools::Itertools; pub fn default() -> T { Default::default() } @@ -45,10 +45,10 @@ pub fn shape_abut_zero(shape: &mut Shape) { pub fn shape_edges(shape: &Shape) -> impl Iterator + Clone + '_ { - chain!( - shape.iter().rev().take(1), - shape, - ) + shape + .iter() + .cycle() + .take(shape.len() + 1) .tuple_windows() .map(|(&a,&b)| [a,b]) }