chore: cleanup some things
This commit is contained in:
parent
6357661920
commit
268080fbab
1 changed files with 3 additions and 2 deletions
|
|
@ -38,9 +38,10 @@ impl Matrix {
|
|||
pub fn from_str(s: String) -> Matrix {
|
||||
let mut d: Vec<Vec<i32>> = Vec::new();
|
||||
let rows_iter = s.split('\n');
|
||||
for (_i, txt) in rows_iter.enumerate() {
|
||||
for (i, txt) in rows_iter.enumerate() {
|
||||
let mut r: Vec<i32> = Vec::new();
|
||||
for (_j, ch) in txt.split(',').enumerate() {
|
||||
for (j, ch) in txt.split(',').enumerate() {
|
||||
// println!("Put {} at {},{}", ch, i, j);
|
||||
let parsed = match i32::from_str(ch) {
|
||||
Ok(n) => n,
|
||||
Err(e) => panic!("Err: {}", e),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue