Skip to content

Commit

Permalink
Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis authored and github-actions[bot] committed Jun 14, 2024
1 parent efe0940 commit b893b62
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.0.0"),
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.0.0")
],
targets: [
.target(
Expand Down
7 changes: 3 additions & 4 deletions Sources/CasePaths/EnumReflection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ func extractHelp<Root, Value>(
return { root in
let rootTag = metadata.tag(of: root)

if
case let (cachedTag?, (isIndirect, associatedValueType)?)
= cache.withLock({ ($0.tag, $0.strategy) })
{
if case let (cachedTag?, (isIndirect, associatedValueType)?) = cache.withLock({
($0.tag, $0.strategy)
}) {
guard rootTag == cachedTag else { return nil }
let value =
EnumMetadata
Expand Down
3 changes: 1 addition & 2 deletions Sources/CasePaths/Internal/Deprecations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,7 @@ public func extract<Root, Value>(
public func extract<Root, Value>(
case embed: @escaping @Sendable (Value) -> Root?,
from root: Root?
) -> Value?
{
) -> Value? {
CasePaths.extract(embed)(root)
}

Expand Down
4 changes: 3 additions & 1 deletion Sources/CasePathsMacros/CasePathableMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ extension CasePathableMacro: MemberMacro {
let bindingNames: String
let returnName: String
if hasPayload, let associatedValue = $0.parameterClause {
embedNames = "(" + associatedValue.parameters.enumerated()
embedNames =
"("
+ associatedValue.parameters.enumerated()
.map { "\($1.firstName.map { "\($0.text): " } ?? "")$\($0)" }
.joined(separator: ", ") + ")"
let parameterNames = (0..<associatedValue.parameters.count)
Expand Down

0 comments on commit b893b62

Please sign in to comment.