Skip to content

Commit 838b15a

Browse files
Stephan SahmStephan Sahm
authored andcommitted
deleted some legay code
1 parent 442fa69 commit 838b15a

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

src/Option.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@ Option(a::T) where T = Identity{T}(a)
99
Option{T}() where T = nothing
1010
Option() = nothing
1111

12-
# we don't need any extra typejoin rules, as they are already provided by Base.promote_typejoin
13-
14-
15-
"""
16-
overwrite `Base.:(==)` and `Base.hash` for `Base.Some`
17-
18-
as the default version is uninuitive and leads to surprising errors if you have the same intuition as me
19-
20-
Unfortunately this may breaks existing Julia code, but the semantics of Some is more a container, then a `Ref`.
21-
For further discussion see https://discourse.julialang.org/t/is-this-a-bug-some-some/39541
22-
"""
23-
24-
Base.:(==)(a::Some, b::Some) = a.value == b.value
25-
Base.hash(a::Some) = hash(a.value)
2612

2713
function iftrue(func::Function, b::Bool)
2814
b ? Identity(func()) : nothing

0 commit comments

Comments
 (0)