1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 04:10:29 +03:00

PatchType requires constructors for deletions.

This commit is contained in:
Rob Rix 2015-10-16 09:28:37 -04:00
parent 00115e422b
commit 64cd995e41

View File

@ -123,6 +123,7 @@ public protocol PatchType {
var inverse: Self { get }
init(replacing before: Element, with after: Element)
init(deleting before: Element)
init(patch: Patch<Element>)
}
@ -133,4 +134,8 @@ extension Patch: PatchType {
public init(replacing before: A, with after: A) {
self = .Replace(before, after)
}
public init(deleting before: A) {
self = .Delete(before)
}
}