Cleanup
This commit is contained in:
parent
51998de5b4
commit
902b36a27f
1 changed files with 0 additions and 2 deletions
|
@ -40,7 +40,6 @@ macro_rules! grid {
|
||||||
( [$( $x0:expr ),*] $([$( $x:expr ),*])* ) => {
|
( [$( $x0:expr ),*] $([$( $x:expr ),*])* ) => {
|
||||||
{
|
{
|
||||||
let mut _assert_width0 = [(); $crate::count!($($x0)*)];
|
let mut _assert_width0 = [(); $crate::count!($($x0)*)];
|
||||||
|
|
||||||
let cols = $crate::count!($($x0)*);
|
let cols = $crate::count!($($x0)*);
|
||||||
let rows = 1usize;
|
let rows = 1usize;
|
||||||
|
|
||||||
|
@ -139,7 +138,6 @@ impl<T: Clone> Grid<T> {
|
||||||
pub fn get(&self, row: usize, col: usize) -> Option<&T> {
|
pub fn get(&self, row: usize, col: usize) -> Option<&T> {
|
||||||
if row < self.rows && col < self.cols() {
|
if row < self.rows && col < self.cols() {
|
||||||
unsafe { Some(&self.data.get_unchecked(row * self.cols() + col)) }
|
unsafe { Some(&self.data.get_unchecked(row * self.cols() + col)) }
|
||||||
//Some(&self.data.get_unchecked(row * self.cols() + col))
|
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue