Post

Rust loop

Rust loop

  • while(true) 대체
  • 2중으로 loop 사용 시, 아래와 같이 loop 이름을 지정하여, 해당 루프의 조건을 사용할 수 있다.


1
2
3
4
5
6
     'outer: loop {
            loop {
                break 'outer;
                continue 'outer;
            }
        }
This post is licensed under CC BY 4.0 by the author.