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 Sep 23, 2024
1 parent 55a29e9 commit 0345c8b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Sources/CasePaths/CasePathable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public protocol CasePathable {

/// A type that is used to distinguish case key paths from key paths by wrapping the enum and
/// associated value types.
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@dynamicMemberLookup
public struct Case<Value>: Sendable {
fileprivate let _embed: @Sendable (Value) -> Any
Expand Down
28 changes: 14 additions & 14 deletions Sources/CasePaths/Internal/Deprecations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ extension AnyCasePath where Root == Value {
prefix operator /

extension AnyCasePath {
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Use 'CasePathable.is' with a case key path, instead")
public static func ~= (pattern: AnyCasePath, value: Root) -> Bool {
pattern.extract(from: value) != nil
}
}

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Use a 'CasePathable' case key path, instead")
public prefix func / <Root, Value>(
embed: @escaping (Value) -> Root
Expand All @@ -78,7 +78,7 @@ public prefix func / <Root, Value>(
)
}

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Use a 'CasePathable' case key path, instead")
public prefix func / <Root, Value>(
embed: @escaping (Value) -> Root?
Expand All @@ -90,31 +90,31 @@ public prefix func / <Root, Value>(
)
}

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Use a 'CasePathable' case key path, instead")
public prefix func / <Root>(
root: @autoclosure @escaping @Sendable () -> Root
) -> AnyCasePath<Root, Void> {
.init(embed: root, extract: extractVoidHelp(root()))
}

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Use a 'CasePathable' case key path, instead")
public prefix func / <Root>(
root: @autoclosure @escaping @Sendable () -> Root?
) -> AnyCasePath<Root?, Void> {
.init(embed: root, extract: optionalPromotedExtractVoidHelp(root()))
}

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Use the '\\.self' case key path, instead")
public prefix func / <Root>(
type: Root.Type
) -> AnyCasePath<Root, Root> {
.self
}

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Use a case key path (like '\\.self' or '\\.some'), instead")
public prefix func / <Root, Value>(
path: AnyCasePath<Root, Value>
Expand All @@ -123,7 +123,7 @@ public prefix func / <Root, Value>(
}

@_disfavoredOverload
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(
*, deprecated, message: "Use a 'CasePathable' case property via dynamic member lookup, instead"
)
Expand All @@ -134,7 +134,7 @@ public prefix func / <Root, Value>(
}

@_disfavoredOverload
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(
*, deprecated, message: "Use a 'CasePathable' case property via dynamic member lookup, instead"
)
Expand All @@ -145,7 +145,7 @@ public prefix func / <Root, Value>(
}

@_disfavoredOverload
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(
*, deprecated, message: "Use a 'CasePathable' case property via dynamic member lookup, instead"
)
Expand All @@ -156,7 +156,7 @@ public prefix func / <Root>(
}

@_disfavoredOverload
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(
*, deprecated, message: "Use a 'CasePathable' case property via dynamic member lookup, instead"
)
Expand All @@ -173,7 +173,7 @@ precedencegroup CasePathCompositionPrecedence {
infix operator .. : CasePathCompositionPrecedence

extension AnyCasePath {
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Append 'CasePathable' case key paths, instead")
public static func .. <AppendedValue>(
lhs: AnyCasePath,
Expand All @@ -182,7 +182,7 @@ extension AnyCasePath {
lhs.appending(path: rhs)
}

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Append 'CasePathable' case key paths, instead")
public static func .. <AppendedValue>(
lhs: AnyCasePath,
Expand All @@ -192,7 +192,7 @@ extension AnyCasePath {
}
}

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, message: "Chain 'CasePathable' case properties, instead")
public func .. <Root, Value, AppendedValue>(
lhs: @escaping (Root) -> Value?,
Expand Down

0 comments on commit 0345c8b

Please sign in to comment.