Skip to content

Commit

Permalink
Fix violation: unused_optional_binding
Browse files Browse the repository at this point in the history
warning: Unused Optional Binding Violation: Prefer `!= nil` over `let _ =` ()
  • Loading branch information
jawwad committed May 3, 2017
1 parent 9af41f2 commit b718f04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Graph/Graph/AdjacencyListGraph.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ open class AdjacencyListGraph<T>: AbstractGraph<T> where T: Equatable, T: Hashab
// works
let edge = Edge(from: from, to: to, weight: weight)
let edgeList = adjacencyList[from.index]
if let _ = edgeList.edges {
if edgeList.edges != nil {
edgeList.addEdge(edge)
} else {
edgeList.edges = [edge]
Expand Down

0 comments on commit b718f04

Please sign in to comment.