diff --git a/core/src/util/mod.rs b/core/src/util/mod.rs index 5c1e50f5..800e04e1 100644 --- a/core/src/util/mod.rs +++ b/core/src/util/mod.rs @@ -38,7 +38,7 @@ pub trait Seq { macro_rules! impl_seq { ($($ty:ty)*) => { $( impl Seq for $ty { - fn next(&self) -> Self { *self + 1 } + fn next(&self) -> Self { (*self).wrapping_add(1) } } )* } }