Skip to content

Commit 841b443

Browse files
authored
Merge pull request kodecocodes#665 from jawwad/fix-dfs-graph-class-warning
Fix warning: Result of call to 'addNode' is unused
2 parents aa6e2bf + 885d9d3 commit 841b443

File tree

1 file changed

+1
-0
lines changed
  • Depth-First Search/DepthFirstSearch.playground/Sources

1 file changed

+1
-0
lines changed

Depth-First Search/DepthFirstSearch.playground/Sources/Graph.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ public class Graph: CustomStringConvertible, Equatable {
55
self.nodes = []
66
}
77

8+
@discardableResult
89
public func addNode(_ label: String) -> Node {
910
let node = Node(label)
1011
nodes.append(node)

0 commit comments

Comments
 (0)