Skip to content

Commit f43a154

Browse files
authored
Fix Swift <6 warning (#3445)
Bit casting a type to the type it already is produces a warning.
1 parent 1aca801 commit f43a154

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,9 @@
2626
func sendableKeyPath(
2727
_ keyPath: AnyKeyPath
2828
) -> _SendableAnyKeyPath {
29-
unsafeBitCast(keyPath, to: _SendableAnyKeyPath.self)
29+
#if compiler(>=6)
30+
unsafeBitCast(keyPath, to: _SendableAnyKeyPath.self)
31+
#else
32+
keyPath
33+
#endif
3034
}

0 commit comments

Comments
 (0)