Skip to content

Commit

Permalink
Fix return type restriction of IO#skip implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Jun 28, 2021
1 parent b7a7cc2 commit fa23fb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/http/content.cr
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module HTTP
@io.peek
end

def skip(bytes_count) : Int32?
def skip(bytes_count) : Nil
ensure_send_continue
@io.skip(bytes_count)
end
Expand Down Expand Up @@ -164,7 +164,7 @@ module HTTP
peek
end

def skip(bytes_count) : Int32?
def skip(bytes_count) : Nil
ensure_send_continue
if bytes_count <= @chunk_remaining
@io.skip(bytes_count)
Expand Down
2 changes: 1 addition & 1 deletion src/io/memory.cr
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class IO::Memory < IO
end

# :nodoc:
def skip(bytes_count)
def skip(bytes_count) : Nil
check_open

available = @bytesize - @pos
Expand Down

0 comments on commit fa23fb5

Please sign in to comment.