LoopGuard

Simple development utility to prevent infinite loops.

Usage

Add this to your Cargo.toml:

[dev-dependencies] loop_guard = "1.0.0"

``` use::loop_guard::LoopGuard;

fn main () { let guard = LoopGuard::new(100);

loop {
    guard.protect() // This will panic after 100 runs of the loop
};

} ```

...that's pretty much about it.

License

LoopGuard is distributed under the terms the MIT license.