Skip to content

Commit 7af9354

Browse files
committed
Debug merge for label uniqueness checking
1 parent e4580ba commit 7af9354

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/src/tutorial_graphs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ julia> has_vertex(cities, 4)
6464
false
6565
```
6666

67-
Note that we can't add the same city twice:
67+
Note that we can't add the same city (i.e. vertex label) twice:
6868

6969
```jldoctest graphs
70-
julia> cities[:London] = "United Kingdom"
70+
julia> add_vertex!(cities, :London, "Italy")
7171
false
7272
7373
julia> nv(cities)

src/graphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Add a vertex to MetaGraph `g` with label `label` having metadata `data`.
8080
8181
Return true if the vertex has been added, false incase the label already exists or vertex was not added.
8282
"""
83-
function Graphs.add_vertex!(g::MetaGraph, label, val)
83+
function Graphs.add_vertex!(g::MetaGraph, label, data)
8484
if haskey(g,label)
8585
return false
8686
end

0 commit comments

Comments
 (0)