From 64cd995e4193f19850fc1bd742ba8e683a43a10b Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 16 Oct 2015 09:28:37 -0400 Subject: [PATCH] PatchType requires constructors for deletions. --- prototype/Doubt/Patch.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prototype/Doubt/Patch.swift b/prototype/Doubt/Patch.swift index ff36b580b..e49675ae3 100644 --- a/prototype/Doubt/Patch.swift +++ b/prototype/Doubt/Patch.swift @@ -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) } @@ -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) + } }