1
0
mirror of synced 2025-11-06 03:20:55 +08:00

fix(rust): [cr_id_skip] Fix compilation exceptions

修复rust编译异常
This commit is contained in:
tqq1994516
2024-10-29 07:38:00 +00:00
parent e06fc2db93
commit 36861f5b68
3 changed files with 3 additions and 3 deletions

View File

@@ -93,7 +93,7 @@ impl SnowWorkerM1 {
// 5.MaxSeqNumber
let mut maxSeqNumber = (1 << options.SeqBitLength) - 1;
if options.maxSeqNumber <= 0 {
if options.MaxSeqNumber <= 0 {
maxSeqNumber = 63;
}
if options.MaxSeqNumber < 0 || options.MaxSeqNumber > maxSeqNumber {

View File

@@ -4,7 +4,6 @@ mod idgen;
// extern crate lazy_static;
extern crate libc;
use libc::{c_char, uint32_t};
use std::ffi::{CStr, CString};
use std::str;
pub use idgen::*;

View File

@@ -31,7 +31,8 @@ fn main() {
while i < times {
i += 1;
YitIdHelper::NextId();
id = YitIdHelper::NextId();
println!("id: {}", id);
// if multiThread { // 这是多线程
// thread::spawn(move || {