Skip to content

Commit 81837d2

Browse files
committed
docs: Update comment with correct bit shift
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 0b07df5 commit 81837d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gen.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)