Skip to content

Commit

Permalink
fixup! Remove return type restriction on IO#read implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Jun 28, 2021
1 parent 0d22aeb commit b46b188
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/io/argf.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class IO::ARGF < IO
@read_from_stdin = false
end

def read(slice : Bytes) : Int32
def read(slice : Bytes)
first_initialize unless @initialized

if current_io = @current_io
Expand Down
2 changes: 1 addition & 1 deletion src/io/hexdump.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class IO::Hexdump < IO
def initialize(@io : IO, @output : IO = STDERR, @read = false, @write = false)
end

def read(buf : Bytes) : Int32
def read(buf : Bytes)
@io.read(buf).tap do |read_bytes|
buf[0, read_bytes].hexdump(@output) if @read && read_bytes
end
Expand Down
2 changes: 1 addition & 1 deletion src/io/stapled.cr
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class IO::Stapled < IO
end

# Reads a slice from `reader`.
def read(slice : Bytes) : Int32
def read(slice : Bytes)
check_open

@reader.read(slice)
Expand Down

0 comments on commit b46b188

Please sign in to comment.