Skip to content

Commit

Permalink
Fix Swift <6 warning (#3445)
Browse files Browse the repository at this point in the history
Bit casting a type to the type it already is produces a warning.
  • Loading branch information
stephencelis authored Oct 15, 2024
1 parent 1aca801 commit f43a154
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
func sendableKeyPath(
_ keyPath: AnyKeyPath
) -> _SendableAnyKeyPath {
unsafeBitCast(keyPath, to: _SendableAnyKeyPath.self)
#if compiler(>=6)
unsafeBitCast(keyPath, to: _SendableAnyKeyPath.self)
#else
keyPath
#endif
}

0 comments on commit f43a154

Please sign in to comment.