Answers for "rust jump back to an outer loop"

0

rust jump back to an outer loop

'outer: for v in m {
    'inner: for i in v {
        if i < 0 {
            println!("Found {} {}", i, v);
            break 'outer;
        }
    }
}
// Consider refactoring the nested loop into a function and use return to break out.
Posted by: Guest on February-24-2021

Browse Popular Code Answers by Language