Skip to content

Commit

Permalink
Update src/namededge.jl
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
mtfishman and github-actions[bot] authored Apr 17, 2024
1 parent 903737c commit b2368a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/namededge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ end
NamedEdge(src::V, dst::V) where {V} = NamedEdge{V}(src, dst)
NamedEdge(src, dst) = NamedEdge{promote_type(typeof(src), typeof(dst))}(src, dst)

GraphsExtensions.convert_vertextype(vertextype::Type, ::Type{<:NamedEdge}) = NamedEdge{vertextype}
function GraphsExtensions.convert_vertextype(vertextype::Type, ::Type{<:NamedEdge})
return NamedEdge{vertextype}
end

Graphs.src(e::NamedEdge) = e.src
Graphs.dst(e::NamedEdge) = e.dst
Expand Down

0 comments on commit b2368a2

Please sign in to comment.