We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.equal(:)
1 parent 9aa8a11 commit c9b2fa9Copy full SHA for c9b2fa9
Sources/LightTableDelta/Delta.swift
@@ -37,6 +37,12 @@ public enum Delta<Element> {
37
/// The source and target elements can be different or equal.
38
case modified(source: Element, target: Element)
39
40
+ /// Returns a modified delta where both the source and target share the same element.
41
+ @inlinable @inline(__always)
42
+ public static func equal(_ element: Element) -> Self {
43
+ .modified(source: element, target: element)
44
+ }
45
+
46
/// Creates a modified delta from a source and a target element.
47
@inlinable @inline(__always)
48
public init(source: Element, target: Element) {
0 commit comments