Skip to content

Commit

Permalink
fix: Output added to convenience callAsFunction methods in DataSour…
Browse files Browse the repository at this point in the history
…ce types
  • Loading branch information
maximkrouk committed Jan 15, 2021
1 parent 8450859 commit 23168cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/FunctionalClosures/DataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class DataSource<Input, Output> {
projectedValue(input)
}

public func callAsFunction() where Input == Void {
public func callAsFunction() -> Output where Input == Void {
projectedValue(())
}
}
Expand Down Expand Up @@ -72,7 +72,7 @@ public class OptionalDataSource<Input, Output> {
projectedValue?(input)
}

public func callAsFunction() where Input == Void {
public func callAsFunction() -> Output? where Input == Void {
projectedValue?(())
}
}

0 comments on commit 23168cf

Please sign in to comment.