fix: id generator (#2525)

This commit is contained in:
Hengfei Yang
2024-01-20 20:50:22 +08:00
committed by GitHub
parent cc78486589
commit f65a650320
+1
View File
@@ -173,6 +173,7 @@ impl SnowflakeIdBucket {
pub fn get_id(&mut self) -> i64 {
if self.bucket.is_empty() {
self.generate_ids();
self.bucket.reverse();
}
self.bucket.pop().unwrap()
}