#[derive(Debug)] struct Edge { to: i32, cost: i32, } fn main() { let V = 3; let E = 3; let matrix = [[0,1], [0,2], [1,2]]; let mut edges: Vec<Edge> = Vec::new(); for i in 0..E { let ed = Edge { to: matrix[i][0], cost: matrix[i][1]}; edges.push(ed); } println!("{:?}", edges); }

