mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Merge pull request #438 from Malvineous/patch-3
Make sequences wrap around to avoid overflows
This commit is contained in:
commit
66f8a98ad2
1 changed files with 1 additions and 1 deletions
|
@ -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) }
|
||||
}
|
||||
)* }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue