Skip to content

Commit

Permalink
Add Codable conformance to Graph types (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbean authored Aug 16, 2019
1 parent 971395b commit 943f061
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Sources/DataStructures/Graph/DirectedGraph.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ extension DirectedGraph {

extension DirectedGraph: Equatable { }
extension DirectedGraph: Hashable { }
extension DirectedGraph: Codable where Node: Codable { }
1 change: 1 addition & 0 deletions Sources/DataStructures/Graph/Graph.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ extension Graph {

extension Graph: Equatable { }
extension Graph: Hashable { }
extension Graph: Codable where Node: Codable { }
1 change: 1 addition & 0 deletions Sources/DataStructures/Graph/WeightedDirectedGraph.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ extension WeightedDirectedGraph {

extension WeightedDirectedGraph: Equatable where Weight: Equatable { }
extension WeightedDirectedGraph: Hashable where Weight: Hashable { }
extension WeightedDirectedGraph: Codable where Node: Codable, Weight: Codable { }
1 change: 1 addition & 0 deletions Sources/DataStructures/Graph/WeightedGraph.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ extension WeightedGraph {

extension WeightedGraph: Equatable where Weight: Equatable { }
extension WeightedGraph: Hashable where Weight: Hashable { }
extension WeightedGraph: Codable where Node: Codable, Weight: Codable { }

0 comments on commit 943f061

Please sign in to comment.