Skip to content

Commit

Permalink
4.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dankinsoid committed Mar 17, 2024
1 parent 01fd29b commit e80a2eb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ import PackageDescription
let package = Package(
name: "SomeProject",
dependencies: [
.package(url: "https://github.com/dankinsoid/VDFlow.git", from: "4.20.0")
.package(url: "https://github.com/dankinsoid/VDFlow.git", from: "4.21.0")
],
targets: [
.target(name: "SomeProject", dependencies: ["VDFlow"])
Expand Down
25 changes: 0 additions & 25 deletions Sources/VDFlow/StepsCollection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,5 @@ public protocol StepsCollection {

associatedtype AllSteps: Hashable & Codable & Sendable
var selected: AllSteps { get set }
static var _mutateIDs: [AllSteps: WritableKeyPath<Self, MutateID>] { get }
var _lastMutateID: MutateID? { get }
}

//extension Optional: CaseIterable where Wrapped: CaseIterable {
//
// public static var allCases: [Wrapped?] {
// [.none] + Wrapped.allCases.map { $0 }
// }
//}
//
//extension Optional: RawRepresentable where Wrapped: RawRepresentable {
//
// public init?(rawValue: Wrapped.RawValue?) {
// switch rawValue {
// case let .some(rawValue):
// guard let wrapped = Wrapped(rawValue: rawValue) else { return nil }
// self = .some(wrapped)
// case .none:
// self = .none
// }
// }
//
// public var rawValue: Wrapped.RawValue? {
// self?.rawValue
// }
//}
2 changes: 1 addition & 1 deletion Sources/VDFlowMacros/StepsMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public struct StepsMacro: MemberAttributeMacro, ExtensionMacro, MemberMacro, Acc

let mutateIDs: DeclSyntax =
"""
public static var _mutateIDs: [AllSteps: WritableKeyPath<Self, MutateID>] {
private static var _mutateIDs: [AllSteps: WritableKeyPath<Self, MutateID>] {
[\(raw: cases.map { ".\($0): \\.$\($0)._mutateID" }.joined(separator: ", "))]
}
"""
Expand Down

0 comments on commit e80a2eb

Please sign in to comment.