summaryrefslogtreecommitdiff
path: root/src/image.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.rs')
-rw-r--r--src/image.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/image.rs b/src/image.rs
index fa1a18d..40cfe01 100644
--- a/src/image.rs
+++ b/src/image.rs
@@ -115,8 +115,7 @@ impl<T: ColorType> ops::Index<(usize, usize)> for PixelArr<T>
{
type Output = T;
- fn index(&self, index: (usize, usize)) -> &Self::Output {
- let (x, y) = index;
+ fn index(&self, (x, y): (usize, usize)) -> &Self::Output {
&self.raw[x + y*(self.width as usize)]
}
}