Skip to content

Commit b9ef916

Browse files
committed
Fixed some warnings related to Redundant conformance
1 parent 8c34127 commit b9ef916

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Graph/Graph/AdjacencyListGraph.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
private class EdgeList<T> where T: Equatable, T: Hashable {
10+
private class EdgeList<T> where T: Hashable {
1111

1212
var vertex: Vertex<T>
1313
var edges: [Edge<T>]?
@@ -22,7 +22,7 @@ private class EdgeList<T> where T: Equatable, T: Hashable {
2222

2323
}
2424

25-
open class AdjacencyListGraph<T>: AbstractGraph<T> where T: Equatable, T: Hashable {
25+
open class AdjacencyListGraph<T>: AbstractGraph<T> where T: Hashable {
2626

2727
fileprivate var adjacencyList: [EdgeList<T>] = []
2828

Graph/Graph/AdjacencyMatrixGraph.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
open class AdjacencyMatrixGraph<T>: AbstractGraph<T> where T: Equatable, T: Hashable {
10+
open class AdjacencyMatrixGraph<T>: AbstractGraph<T> where T: Hashable {
1111

1212
// If adjacencyMatrix[i][j] is not nil, then there is an edge from
1313
// vertex i to vertex j.

Graph/Graph/Edge.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct Edge<T>: Equatable where T: Equatable, T: Hashable {
10+
public struct Edge<T>: Equatable where T: Hashable {
1111

1212
public let from: Vertex<T>
1313
public let to: Vertex<T>

Graph/Graph/Graph.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
open class AbstractGraph<T>: CustomStringConvertible where T: Equatable, T: Hashable {
10+
open class AbstractGraph<T>: CustomStringConvertible where T: Hashable {
1111

1212
public required init() {}
1313

Graph/Graph/Vertex.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public struct Vertex<T>: Equatable where T: Equatable, T: Hashable {
10+
public struct Vertex<T>: Equatable where T: Hashable {
1111

1212
public var data: T
1313
public let index: Int
@@ -30,7 +30,7 @@ extension Vertex: Hashable {
3030

3131
}
3232

33-
public func ==<T: Equatable>(lhs: Vertex<T>, rhs: Vertex<T>) -> Bool {
33+
public func ==<T>(lhs: Vertex<T>, rhs: Vertex<T>) -> Bool {
3434
guard lhs.index == rhs.index else {
3535
return false
3636
}

0 commit comments

Comments
 (0)