RS.CLIPPY.INT_PLUS_ONE

Instead of using `x >= y + 1`, use `x > y`

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: int_plus_one. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for usage of x >= y + 1 or x - 1 >= y (and <=) in a block

Why is this bad?

Readability – better to use > y instead of >= y + 1.

Example

if x >= y + 1 {}

Use instead:

if x > y {}