aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-04-03 10:06:12 +0100
committerAkshay <[email protected]>2021-04-03 10:06:41 +0100
commit62d9de6a368a50dcb62b2b97a5fb02a3858b0977 (patch)
treea14169afb19a08ff5e3aa54eabda023e9c178853 /src
parentc97b91744ef37baa76b4a91deb1a9f48aeb3fd6a (diff)
fix reflect figure
Diffstat (limited to 'src')
-rw-r--r--src/symmetry.rs2
-rw-r--r--src/utils.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/symmetry.rs b/src/symmetry.rs
index 60ff791..6d4aed2 100644
--- a/src/symmetry.rs
+++ b/src/symmetry.rs
@@ -18,7 +18,7 @@ impl Symmetry {
18 (Some(x), Some(y)) => { 18 (Some(x), Some(y)) => {
19 let along_x = mirror_figure(figure, x, Axis::X); 19 let along_x = mirror_figure(figure, x, Axis::X);
20 let along_y = mirror_figure(figure, y, Axis::Y); 20 let along_y = mirror_figure(figure, y, Axis::Y);
21 let reflected = reflect_figure(figure, (x, y).into()); 21 let reflected = reflect_figure(figure, (y, x).into());
22 along_x 22 along_x
23 .into_iter() 23 .into_iter()
24 .chain(along_y) 24 .chain(along_y)
diff --git a/src/utils.rs b/src/utils.rs
index 6819e71..bee5782 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -106,5 +106,5 @@ pub fn load_file<P: AsRef<Path>>(path: P) -> Result<Image, io::Error> {
106 .open(&path)?; 106 .open(&path)?;
107 let mut buf = Vec::new(); 107 let mut buf = Vec::new();
108 image.read_to_end(&mut buf)?; 108 image.read_to_end(&mut buf)?;
109 Ok(Image::decode(&mut (Cursor::new(buf))).unwrap()) // TODO: obi erro 109 Ok(Image::decode(&mut (Cursor::new(buf))).unwrap()) // TODO: obi error
110} 110}