Skip to content

Commit ed1ed26

Browse files
committed
hm
1 parent 1602cca commit ed1ed26

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

Sources/VDFlow/EmptyStep.swift

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ public struct EmptyStep: Hashable, Codable, CustomStringConvertible, Sendable {
1313
public init() {}
1414
}
1515

16-
extension EmptyStep: StepsCollection {
16+
public struct EmptyStepsCollection: StepsCollection {
1717

1818
public var selected: AllSteps {
1919
get { .none }
2020
set {}
2121
}
22+
23+
public init() {}
2224

23-
public static func step<T>(for keyPath: WritableKeyPath<EmptyStep, StepID<T>>) -> AllSteps? {
25+
public static func step<T>(for keyPath: WritableKeyPath<Self, StepID<T>>) -> AllSteps? {
2426
AllSteps.none
2527
}
2628

@@ -31,3 +33,19 @@ extension EmptyStep: StepsCollection {
3133

3234
public var _lastMutateID: MutateID? { nil }
3335
}
36+
37+
extension Never: StepsCollection {
38+
39+
public typealias AllSteps = EmptyStepsCollection.AllSteps
40+
41+
public var selected: AllSteps {
42+
get { .none }
43+
set {}
44+
}
45+
46+
public static func step<T>(for keyPath: WritableKeyPath<Self, StepID<T>>) -> AllSteps? {
47+
AllSteps.none
48+
}
49+
50+
public var _lastMutateID: MutateID? { nil }
51+
}

0 commit comments

Comments
 (0)