Rust

Rust

By DeepSource

Found while with constant condition RS-W1077

Anti-pattern

A while loop with a constant condition will either never run or enter an infinite loop. If intentional, consider using a loop statement instead.

Examples

Bad practice

while 100 > 10 {}

Recommended

loop {}