Skip to content

Commit b718f04

Browse files
committed
Fix violation: unused_optional_binding
warning: Unused Optional Binding Violation: Prefer `!= nil` over `let _ =` ()
1 parent 9af41f2 commit b718f04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Graph/Graph/AdjacencyListGraph.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ open class AdjacencyListGraph<T>: AbstractGraph<T> where T: Equatable, T: Hashab
7878
// works
7979
let edge = Edge(from: from, to: to, weight: weight)
8080
let edgeList = adjacencyList[from.index]
81-
if let _ = edgeList.edges {
81+
if edgeList.edges != nil {
8282
edgeList.addEdge(edge)
8383
} else {
8484
edgeList.edges = [edge]

0 commit comments

Comments
 (0)