Skip to content

Commit 954246f

Browse files
committed
Avoid uncessary conversions of nullables.
1 parent 3b305b0 commit 954246f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

base/nullable.jl

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Nullable() = Nullable{Union{}}()
88

99
eltype{T}(::Type{Nullable{T}}) = T
1010

11+
convert{T}(::Type{Nullable{T}}, x::Nullable{T}) = x
12+
1113
function convert{T}(::Type{Nullable{T}}, x::Nullable)
1214
return isnull(x) ? Nullable{T}() : Nullable{T}(convert(T, get(x)))
1315
end

0 commit comments

Comments
 (0)