summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongheng Liu <z.liu@outlook.com.gr>2025-01-22 12:59:19 +0200
committerZhongheng Liu <z.liu@outlook.com.gr>2025-01-22 12:59:19 +0200
commit268080fbab046c41cf4525210a68166f917a412a (patch)
treede382899b46bfda3501211393b93cef800ca508f
parent6357661920a7be21552efdeb15d5f128ce7a5647 (diff)
downloadmatrix-rs-268080fbab046c41cf4525210a68166f917a412a.tar.gz
matrix-rs-268080fbab046c41cf4525210a68166f917a412a.tar.bz2
matrix-rs-268080fbab046c41cf4525210a68166f917a412a.zip
chore: cleanup some things
-rw-r--r--src/types/matrix.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/types/matrix.rs b/src/types/matrix.rs
index 09277b3..935d0dd 100644
--- a/src/types/matrix.rs
+++ b/src/types/matrix.rs
@@ -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),