Skip to content

Commit a239527

Browse files
authored
docs: Update comment with correct bit shift (#15)
The doc comment said that we were shifting the timestamp 16 bytes (128 bits) to the left, which was not correct. We are only shifting it 8 bytes (64 bits) to the left.
1 parent cfd301b commit a239527

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl FlakeGen {
5252
}
5353

5454
/// Perform the neccessary bit manipulations to transform
55-
/// 0000 0000 aaaa aaaa (timestamp) << 16 * 8
55+
/// 0000 0000 aaaa aaaa (timestamp) << 8 * 8
5656
/// 0000 0000 00bb bbbb (node) << 2 * 8
5757
/// 0000 0000 0000 00cc (seq)
5858
/// into XOR

0 commit comments

Comments
 (0)