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:
parent
00115e422b
commit
64cd995e41
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user