jflinter / Dwifft

Swift Diff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redundant Conformance on Protocol Equatable

wm-j-ray opened this issue · comments

Jack,

I'm getting an error on Dwift.swift line 131 under xCode 9GM, after Swift 4 conversion

public static func diff<Section: Equatable, Value: Equatable>(lhs: SectionedValues<Section, Value>, rhs: SectionedValues<Section, Value>) -> [SectionedDiffStep<Section, Value>]

and I'm certainly not smart enough to fix it without breaking everything. Any help greatly appreciated.

Thank in advance

@wm-j-ray There is a swift 4 branch that takes care of this.

If you can't use that using something like

pod 'Dwifft', :git => 'https://github.com/jflinter/Dwifft.git', :branch => 'swift4'

Then you can change the line

public static func diff<Section: Equatable, Value: Equatable>(lhs: SectionedValues<Section, Value>, rhs: SectionedValues<Section, Value>) -> [SectionedDiffStep<Section, Value>] {

to

public static func diff<Section, Value>(lhs: SectionedValues<Section, Value>, rhs: SectionedValues<Section, Value>) -> [SectionedDiffStep<Section, Value>] {