Skip to content

Commit 13ea2cd

Browse files
Shubham8287Centril
andauthored
Update crates/datastore/src/locking_tx_datastore/sequence.rs
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com> Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
1 parent 38071c8 commit 13ea2cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/datastore/src/locking_tx_datastore/sequence.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl Sequence {
8484

8585
/// Update the persisted allocation cursor for the sequence.
8686
pub(super) fn update_allocation(&mut self, new_allocated: i128) {
87-
if new_allocated < self.schema.min_value || new_allocated > self.schema.max_value {
87+
if !(self.schema.min_value..=self.schema.max_value).contains(&new_allocated) {
8888
panic!(
8989
"Invalid sequence allocation update: new allocated {} is out of bounds for sequence with min_value {} and max_value {}",
9090
new_allocated, self.schema.min_value, self.schema.max_value

0 commit comments

Comments
 (0)