Use auto sort to break ties when sorting

This commit is contained in:
Alex Ling
2020-07-15 15:13:38 +00:00
parent 687788767f
commit 69b06a8352
2 changed files with 26 additions and 5 deletions

View File

@@ -29,3 +29,19 @@ def register_mime_types
MIME.register k, v
end
end
struct Int
def or(other : Int)
if self == 0
other
else
self
end
end
end
struct Nil
def or(other : Int)
other
end
end