File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " cuid1"
3
3
version = " 0.1.0"
4
+ description = " An implementation of the CUID protocol in rust"
5
+ documentation = " https://docs.rs/cuid/latest/cuid1/"
4
6
resolver = " 2"
5
7
edition.workspace = true
6
8
authors.workspace = true
Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ mod random;
6
6
mod text;
7
7
mod time;
8
8
9
- use once_cell:: sync:: Lazy ;
10
9
use rand:: { thread_rng, Rng } ;
11
- use std:: sync:: atomic:: { AtomicU32 , Ordering } ;
10
+ use std:: sync:: {
11
+ atomic:: { AtomicU32 , Ordering } ,
12
+ LazyLock ,
13
+ } ;
12
14
13
15
const BASE : u8 = 36 ;
14
16
const BLOCK_SIZE : usize = 4 ;
@@ -17,7 +19,7 @@ const START_STR: &str = "c";
17
19
18
20
static COUNTER : AtomicU32 = AtomicU32 :: new ( 0 ) ;
19
21
20
- static FINGERPRINT : Lazy < String > = Lazy :: new ( fingerprint:: fingerprint) ;
22
+ static FINGERPRINT : LazyLock < String > = LazyLock :: new ( fingerprint:: fingerprint) ;
21
23
22
24
/// Generate a v1 CUID
23
25
///
You can’t perform that action at this time.
0 commit comments