equal
deleted
inserted
replaced
52 |
52 |
53 #[inline] |
53 #[inline] |
54 pub fn get_mut(&mut self, row: usize, column: usize) -> Option<&mut <usize as SliceIndex<[T]>>::Output> { |
54 pub fn get_mut(&mut self, row: usize, column: usize) -> Option<&mut <usize as SliceIndex<[T]>>::Output> { |
55 self.data.get_mut(row * self.width + column) |
55 self.data.get_mut(row * self.width + column) |
56 } |
56 } |
|
57 |
|
58 #[inline] |
|
59 pub fn get(&self, row: usize, column: usize) -> Option<&<usize as SliceIndex<[T]>>::Output> { |
|
60 self.data.get(row * self.width + column) |
|
61 } |
57 } |
62 } |
58 |
63 |
59 #[cfg(test)] |
64 #[cfg(test)] |
60 mod tests { |
65 mod tests { |
61 use super::*; |
66 use super::*; |