Replace Nullable{T} with Union{T, Nothing}

This commit is contained in:
Michael K. Borregaard 2018-05-04 10:43:50 +02:00
parent 5b0ba79a35
commit 1b5c258e00
2 changed files with 3 additions and 3 deletions

View File

@ -443,7 +443,7 @@ mutable struct SeriesAnnotations
end end
function series_annotations(strs::AbstractVector, args...) function series_annotations(strs::AbstractVector, args...)
fnt = font() fnt = font()
shp = Nullable{Any}() shp = Union{Any, Nothing}()
scalefactor = (1,1) scalefactor = (1,1)
for arg in args for arg in args
if isa(arg, Shape) || (isa(arg, AbstractVector) && eltype(arg) == Shape) if isa(arg, Shape) || (isa(arg, AbstractVector) && eltype(arg) == Shape)

View File

@ -1,8 +1,8 @@
mutable struct CurrentPlot mutable struct CurrentPlot
nullableplot::Nullable{AbstractPlot} nullableplot::Union{AbstractPlot, Nothing}
end end
const CURRENT_PLOT = CurrentPlot(Nullable{AbstractPlot}()) const CURRENT_PLOT = CurrentPlot(Union{AbstractPlot, Nothing}())
isplotnull() = isnull(CURRENT_PLOT.nullableplot) isplotnull() = isnull(CURRENT_PLOT.nullableplot)