Skip to content

Commit

Permalink
Fix return type restrictions crystal-lang#10582
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Jun 28, 2021
2 parents 59854c4 + 53331b1 commit 22b9011
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/enumerable.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ module Enumerable(T)
end

# Like `minmax` but returns `{nil, nil}` if the collection is empty.
def minmax? : {T?, T?}
def minmax? : {T, T} | {Nil, Nil}
minmax_by? &.itself
end

Expand Down
2 changes: 1 addition & 1 deletion src/static_array.cr
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ struct StaticArray(T, N)
# array.size # => 3
# ```
def size : Int32
N
N.to_i32
end

# Replaces every element in `self` with the given *value*. Returns `self`.
Expand Down

0 comments on commit 22b9011

Please sign in to comment.