Auto merge of #43588 - dns2utf8:wrapping_add, r=sfackler
Use explicit wrapping_add … … to prevent potential unexpected behavior on debug builds.
This commit is contained in:
commit
c2de81f4c9
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ impl Barrier {
|
|||
BarrierWaitResult(false)
|
||||
} else {
|
||||
lock.count = 0;
|
||||
lock.generation_id += 1;
|
||||
lock.generation_id = lock.generation_id.wrapping_add(1);
|
||||
self.cvar.notify_all();
|
||||
BarrierWaitResult(true)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue