1
0
mirror of synced 2025-12-11 15:48:13 +08:00

Merge pull request #117 from tqq1994516/fix-rust-error

fix(rust): Fix compilation exceptions
This commit is contained in:
yitter
2025-01-20 01:58:52 +08:00
committed by GitHub
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 || {