Skip to content

Commit e1af902

Browse files
committed
Improved code
1 parent ac701f1 commit e1af902

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/pgvector/bit.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ def to_a
2727

2828
def to_binary
2929
buffer = [@data.length].pack("l>")
30-
# TODO improve
31-
@data.scan(/.{1,8}/).each do |b|
32-
[b].pack("B*", buffer: buffer)
33-
end
30+
[@data].pack("B*", buffer: buffer)
3431
buffer
3532
end
3633
end

0 commit comments

Comments
 (0)