This code gives correct answer for example input but not for user input. (Gives way more answer) I would like to get some hints or answers about my code. Thanks my fellow rustaceans!

```
fn main() {
let a = "2199943210
3987894921
9856789892
8767896789
9899965678".to_string();
let a: Vec<Vec<u32>> = a.lines().map(|s|s.trim().chars().map(|c|c.to_digit(10).unwrap()).collect::<Vec<u32>>()).collect();
let LIMIT_ROW: usize = a.len();
let LIMIT_COLUMN: usize = a[0].len();
let mut ans: Vec<u32> = Vec::new();
for (row_index ,row) in a.iter().enumerate() {
for (col_index,col) in row.iter().enumerate() {
let mut sides: Vec<u32> = Vec::new();
let (left_side,right_side) = ((col_index as i32 -1),(col_index as i32 +1));
let (up_side,down_side) = ((row_index as i32-1) ,(row_index as i32+1));
if left_side >= 0 as i32 {
sides.push(a[row_index][left_side as usize])
}
if right_side < LIMIT_COLUMN as i32 {
sides.push(a[row_index][right_side as usize])
}
if up_side >= 0 {
sides.push(a[up_side as usize][col_index])
}
if down_side < LIMIT_ROW as i32 {
sides.push(a[down_side as usize][col_index])
}
sides.push(*col);
match sides.iter().min() {
Some(min) if *min == *col => {
ans.push(*col+1);
},
_ => {}
}
sides.clear()
}
}
println!("ans: {}",ans.iter().sum::<u32>());
}
```