Skip to content

Commit

Permalink
Revert "Fix return type restriciton of Enumerable#minmax"
Browse files Browse the repository at this point in the history
This reverts commit 0cad8f7.
  • Loading branch information
straight-shoota committed Jun 28, 2021
1 parent fa23fb5 commit b998a9f
Showing 1 changed file with 1 addition and 1 deletion.
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} | {Nil, Nil}
def minmax? : {T?, T?}
minmax_by? &.itself
end

Expand Down

0 comments on commit b998a9f

Please sign in to comment.