Browse Source

auto commit

tags/v1.0.0
zhouzj 3 years ago
parent
commit
f5bf463370
3 changed files with 4 additions and 2 deletions
  1. +1
    -1
      Rust/source/Cargo.lock
  2. +1
    -1
      Rust/source/Cargo.toml
  3. +2
    -0
      Rust/source/src/yitgen/gen/yit_id_helper.rs

+ 1
- 1
Rust/source/Cargo.lock View File

@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "RS-SnowF"
version = "0.1.0"
version = "1.0.0"
dependencies = [
"chrono",
"lazy_static",


+ 1
- 1
Rust/source/Cargo.toml View File

@@ -2,7 +2,7 @@
name = "RS-SnowF"
version = "1.0.0"
authors = ["yitter <yitter@126.com>"]
edition = "2021"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html



+ 2
- 0
Rust/source/src/yitgen/gen/yit_id_helper.rs View File

@@ -23,12 +23,14 @@ impl YitIdHelper {
}
}
pub fn SetIdGenerator(options: IdGeneratorOptions) {
let mut idgenArc = YitIdHelper::IdGenInstance();
let mut idgen = idgenArc.lock().unwrap();
idgen.Worker.SetOptions(options);
}
#[no_mangle]
pub fn NextId() -> i64 {
let mut idgenArc = YitIdHelper::IdGenInstance();
let mut idgen = idgenArc.lock().unwrap();


Loading…
Cancel
Save