Merge pull request #1651 from mkborregaard/master

Update instances of `findfirst` to 1.0 syntax
This commit is contained in:
Michael Krabbe Borregaard 2018-08-14 10:24:40 +02:00 committed by GitHub
commit 7e360aa915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ function _series_updated(plt::Plot{PlotlyJSBackend}, series::Series)
end end
PlotlyJS.restyle!( PlotlyJS.restyle!(
plt.o, plt.o,
findfirst(plt.series_list, series), findfirst(isequal(series), plt.series_list),
kw kw
) )
end end

View File

@ -283,11 +283,11 @@ end
function plot(sp::Subplot, args...; kw...) function plot(sp::Subplot, args...; kw...)
plt = sp.plt plt = sp.plt
plot(plt, args...; kw..., subplot = findfirst(plt.subplots, sp)) plot(plt, args...; kw..., subplot = findfirst(isequal(sp), plt.subplots))
end end
function plot!(sp::Subplot, args...; kw...) function plot!(sp::Subplot, args...; kw...)
plt = sp.plt plt = sp.plt
plot!(plt, args...; kw..., subplot = findfirst(plt.subplots, sp)) plot!(plt, args...; kw..., subplot = findfirst(isequal(sp), plt.subplots))
end end
# -------------------------------------------------------------------- # --------------------------------------------------------------------

View File

@ -46,7 +46,7 @@ function plotattr(attrtype::Symbol, attribute::AbstractString)
attribute = Symbol(lookup_aliases(attrtype, attribute)) attribute = Symbol(lookup_aliases(attrtype, attribute))
desc = get(_arg_desc, attribute, "") desc = get(_arg_desc, attribute, "")
first_period_idx = findfirst(desc, '.') first_period_idx = findfirst(isequal('.'), desc)
typedesc = desc[1:first_period_idx-1] typedesc = desc[1:first_period_idx-1]
desc = strip(desc[first_period_idx+1:end]) desc = strip(desc[first_period_idx+1:end])
als = keys(filter((_,v)->v==attribute, _keyAliases)) |> collect |> sort als = keys(filter((_,v)->v==attribute, _keyAliases)) |> collect |> sort