Skip to content

Commit

Permalink
Make SetValue more Generic by using Self instead of State
Browse files Browse the repository at this point in the history
otherwise, this only works on Structs called “State”
  • Loading branch information
Lutzifer committed Jan 22, 2024
1 parent c3dcb20 commit cc85990
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/ChangeableMacros/ChangeableMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public struct ChangeableFunctionMacro: MemberMacro {
.joined(separator: ",\n ")

let applyDeclaration: DeclSyntax = """
public func apply(action: SetValue<State, some Any>) -> Self {
public func apply(action: SetValue<Self, some Any>) -> Self {
let path = action.path
let value = action.value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ b != nil
)
}

public func apply(action: SetValue<State, some Any>) -> Self {
public func apply(action: SetValue<Self, some Any>) -> Self {
let path = action.path
let value = action.value

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ b != nil
)
}

public func apply(action: SetValue<State, some Any>) -> Self {
public func apply(action: SetValue<Self, some Any>) -> Self {
let path = action.path
let value = action.value

Expand Down

0 comments on commit cc85990

Please sign in to comment.