chiark
/
gitweb
/
~ian
/
z3-treefoil
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
beb8eab
)
Revert "edges in other order"
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 29 Oct 2022 21:35:06 +0000
(22:35 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 29 Oct 2022 21:35:06 +0000
(22:35 +0100)
This reverts commit
8a44d2efe9db7ce76c33d5d28fe10af5b60ba7cb
.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/lib.rs
patch
|
blob
|
history
diff --git
a/src/lib.rs
b/src/lib.rs
index 58bbc56ea29fc80dc5839ff40fff8921016cac90..06566d826eae6617b597ed08355daf757fdca64c 100644
(file)
--- 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>() -> T { Default::default() }
@@
-45,10
+45,10
@@
pub fn shape_abut_zero(shape: &mut Shape) {
pub fn shape_edges(shape: &Shape)
-> impl Iterator<Item=[Point; 2]> + Clone + '_
{
- chain!(
- shape.iter().rev().take(1),
- shape,
- )
+ shape
+ .iter()
+ .cycle()
+
.take(shape.len() + 1
)
.tuple_windows()
.map(|(&a,&b)| [a,b])
}