1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Fix Style/SelfAssignment cop (#28171)

This commit is contained in:
Matt Jankowski 2023-12-01 10:52:52 -05:00 committed by GitHub
parent f70f39dd04
commit a98fccf84e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,7 +99,7 @@ module Mastodon::Snowflake
def id_at(timestamp, with_random: true)
id = timestamp.to_i * 1000
id += rand(1000) if with_random
id = id << 16
id <<= 16
id += rand(2**16) if with_random
id
end