| @@ -2,7 +2,7 @@ | |||||
| # It is not intended for manual editing. | # It is not intended for manual editing. | ||||
| [[package]] | [[package]] | ||||
| name = "RS-SnowF" | name = "RS-SnowF" | ||||
| version = "0.1.0" | |||||
| version = "1.0.0" | |||||
| dependencies = [ | dependencies = [ | ||||
| "chrono", | "chrono", | ||||
| "lazy_static", | "lazy_static", | ||||
| @@ -2,7 +2,7 @@ | |||||
| name = "RS-SnowF" | name = "RS-SnowF" | ||||
| version = "1.0.0" | version = "1.0.0" | ||||
| authors = ["yitter <yitter@126.com>"] | 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 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||||
| @@ -23,12 +23,14 @@ impl YitIdHelper { | |||||
| } | } | ||||
| } | } | ||||
| pub fn SetIdGenerator(options: IdGeneratorOptions) { | pub fn SetIdGenerator(options: IdGeneratorOptions) { | ||||
| let mut idgenArc = YitIdHelper::IdGenInstance(); | let mut idgenArc = YitIdHelper::IdGenInstance(); | ||||
| let mut idgen = idgenArc.lock().unwrap(); | let mut idgen = idgenArc.lock().unwrap(); | ||||
| idgen.Worker.SetOptions(options); | idgen.Worker.SetOptions(options); | ||||
| } | } | ||||
| #[no_mangle] | |||||
| pub fn NextId() -> i64 { | pub fn NextId() -> i64 { | ||||
| let mut idgenArc = YitIdHelper::IdGenInstance(); | let mut idgenArc = YitIdHelper::IdGenInstance(); | ||||
| let mut idgen = idgenArc.lock().unwrap(); | let mut idgen = idgenArc.lock().unwrap(); | ||||