still working on tests

This commit is contained in:
Henry Schimke
2023-04-17 16:47:57 -05:00
parent d5c4d4de78
commit d3ce9fcb90
7 changed files with 148 additions and 249 deletions

View File

@@ -417,3 +417,15 @@ impl Into<Vec<u8>> for BitArray {
// arr
}
}
impl Into<Vec<bool>> for BitArray {
fn into(self) -> Vec<bool> {
let mut array = vec![false; self.size];
for pixel in 0..self.size {
array[pixel] = bool::from(self.get(pixel));
}
array
}
}