From 81837d2772dffbe2047dc2d8fecb10638a37b688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20=C3=96sterberg?= Date: Thu, 19 Mar 2026 22:55:43 +0100 Subject: [PATCH] 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. --- src/gen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gen.rs b/src/gen.rs index 35684cd..916d966 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -52,7 +52,7 @@ impl FlakeGen { } /// Perform the neccessary bit manipulations to transform - /// 0000 0000 aaaa aaaa (timestamp) << 16 * 8 + /// 0000 0000 aaaa aaaa (timestamp) << 8 * 8 /// 0000 0000 00bb bbbb (node) << 2 * 8 /// 0000 0000 0000 00cc (seq) /// into XOR