Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
infinite_loop
: do not defensively use saturating_sub()
Using `saturating_sub()` here in code which cannot fail brings a false sense of security. If for any reason a logic error was introduced and caused `self.loop_depth` to reach 0 before being decremented, using `saturating_sub(1)` would silently mask the programming error instead of panicking loudly as it should (at least in dev profile).
- Loading branch information