Skip to content

Commit 64c1fed

Browse files
committed
set type constraints on AbstractOSMGraph
1 parent 4b64eda commit 64c1fed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/types.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ Container for storing OpenStreetMap node, way, relation and graph related obejct
134134
"""
135135

136136

137-
abstract type AbstractOSMGraph end
138-
@with_kw mutable struct OSMGraph{U <: Integer,T <: Union{Integer, String},W <: Real} <: AbstractOSMGraph
137+
abstract type AbstractOSMGraph{U <: Integer,T <: Union{Integer, String},W <: Real} end
138+
@with_kw mutable struct OSMGraph{U,T,W} <: AbstractOSMGraph{U,T,W}
139139
nodes::Dict{T,Node{T}} = Dict{T,Node{T}}()
140140
node_coordinates::Vector{Vector{W}} = Vector{Vector{W}}() # needed for astar heuristic
141141
ways::Dict{T,Way{T}} = Dict{T,Way{T}}()
@@ -169,7 +169,7 @@ function Base.getproperty(g::OSMGraph, field::Symbol)
169169
end
170170
end
171171

172-
struct SimplifiedOSMGraph{U <: Integer, T <: Union{Integer, String}, W <: Real} <: AbstractOSMGraph
172+
struct SimplifiedOSMGraph{U,T,W} <: AbstractOSMGraph{U,T,W}
173173
parent::OSMGraph{U,T,W}
174174
node_coordinates::Vector{Vector{W}} # needed for astar heuristic
175175
node_to_index::OrderedDict{T,U}

0 commit comments

Comments
 (0)