Skip to content

Commit

Permalink
Update iteration protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
sswatson committed Aug 18, 2018
1 parent 4e42aa1 commit 5e5ad08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/AsyPlots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import ColorTypes,

import DataStructures: OrderedDict

import Base: show, print, string, convert, complex, abs,
start, next, done,
import Base: show, print, string, convert, complex, abs, iterate,
+, *, -, ==

export Point, Point2D, Point3D,
Expand Down
2 changes: 1 addition & 1 deletion src/cairo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ struct BoundingBox
end

const colorplaces = [:r,:g,:b]
import Base.iterate

iterate(c::ColorTypes.RGB) = (getfield(c,first(colorplaces)),2)
iterate(c::ColorTypes.RGB,i) = i > 3 ? nothing : (getfield(c,colorplaces[i]),i+1)

Expand Down

0 comments on commit 5e5ad08

Please sign in to comment.