Skip to content

Commit

Permalink
reperaid previous changes
Browse files Browse the repository at this point in the history
  • Loading branch information
antiyro committed Mar 4, 2024
1 parent 7f81111 commit cfb3acd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ impl BasicIdBuilder {

/// Create a new ID (unique).
pub fn new_id(&mut self) -> BasicId {
let id = BasicId(self.last_id);
self.last_id = self.last_id.checked_add(1).expect("Id overflow");
BasicId::new(self.last_id - 1)
id
}
}

0 comments on commit cfb3acd

Please sign in to comment.