made Grid no_std compatible + removed stray logging
This commit is contained in:
parent
3a83c9c7f7
commit
91e78a94bc
2 changed files with 15 additions and 1 deletions
|
@ -22,6 +22,13 @@ status = "actively-developed"
|
|||
criterion = "0.3.1"
|
||||
rand="0.7.3"
|
||||
|
||||
[dependencies]
|
||||
no-std-compat = { version = "0.4.1", features = [ "alloc" ] }
|
||||
|
||||
[[bench]]
|
||||
name = "benches"
|
||||
harness = false
|
||||
|
||||
[features]
|
||||
default = [ "std" ] # Default to using the std
|
||||
std = [ "no-std-compat/std" ]
|
|
@ -30,6 +30,14 @@ grid.push_row(vec![7,8,9]);
|
|||
assert_eq!(grid, grid![[1,2,3][4,5,6][7,8,9]])
|
||||
```
|
||||
*/
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
extern crate no_std_compat as std;
|
||||
#[cfg(not(feature = "std"))]
|
||||
use std::prelude::v1::*;
|
||||
|
||||
use std::cmp::Eq;
|
||||
use std::fmt;
|
||||
use std::iter::StepBy;
|
||||
|
@ -539,7 +547,6 @@ impl<T: Clone> Grid<T> {
|
|||
let mut col = Vec::with_capacity(self.rows);
|
||||
for i in 0..self.rows {
|
||||
let idx = i * self.cols + self.cols - 1 - i;
|
||||
println!["{:?}", idx];
|
||||
col.push(self.data.remove(idx));
|
||||
}
|
||||
self.cols -= 1;
|
||||
|
|
Loading…
Reference in a new issue