Skip to content

Apply crystal tool format from Crystal 1.15 #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/mysql/connection.cr
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MySql::Connection < DB::Connection
end

# :nodoc:
def read_ok_or_err
def read_ok_or_err(&)
read_packet do |packet|
raise_if_err_packet(packet) do |status|
yield packet, status
Expand All @@ -73,7 +73,7 @@ class MySql::Connection < DB::Connection
end

# :nodoc:
def read_packet
def read_packet(&)
packet = build_read_packet
begin
yield packet
Expand All @@ -96,7 +96,7 @@ class MySql::Connection < DB::Connection
end

# :nodoc:
def write_packet(seq = 0)
def write_packet(seq = 0, &)
content = IO::Memory.new
yield WritePacket.new(content, self)
bytesize = content.bytesize
Expand Down Expand Up @@ -128,7 +128,7 @@ class MySql::Connection < DB::Connection
end

# :nodoc:
def raise_if_err_packet(packet)
def raise_if_err_packet(packet, &)
status = packet.read_byte!
if status == 255
handle_err_packet packet
Expand Down
2 changes: 1 addition & 1 deletion src/mysql/result_set.cr
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class MySql::ResultSet < DB::ResultSet
@columns[index].name
end

protected def mysql_read
protected def mysql_read(&)
row_packet = @row_packet.not_nil!

is_nil = @null_bitmap[@column_index + 2]
Expand Down
2 changes: 1 addition & 1 deletion src/mysql/text_result_set.cr
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MySql::TextResultSet < DB::ResultSet
@columns[index].name
end

protected def mysql_read
protected def mysql_read(&)
row_packet = @row_packet.not_nil!

if @first_row_packet
Expand Down
Loading