Browse Source

Fix various warnings (#1935)

Motivation:

Swift 6 compiler emits various warnings which we can fix/suppress.

Modifications:

- Add `@unchecked Sendable` where appropriate
- Add a `@retroactive` where appropriate
- Remove use of an inappropriate retroactive conformance

Result:

Fewer warnings
George Barnett 1 year ago
parent
commit
ce7461e836
1 changed files with 9 additions and 1 deletions
  1. 9 1
      Tests/GRPCHTTP2CoreTests/GRPCStreamStateMachineTests.swift

+ 9 - 1
Tests/GRPCHTTP2CoreTests/GRPCStreamStateMachineTests.swift

@@ -2722,7 +2722,7 @@ extension XCTestCase {
 }
 
 @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
-extension GRPCStreamStateMachine.OnNextOutboundFrame: Equatable {
+extension GRPCStreamStateMachine.OnNextOutboundFrame {
   public static func == (
     lhs: GRPCStreamStateMachine.OnNextOutboundFrame,
     rhs: GRPCStreamStateMachine.OnNextOutboundFrame
@@ -2741,3 +2741,11 @@ extension GRPCStreamStateMachine.OnNextOutboundFrame: Equatable {
     }
   }
 }
+
+#if compiler(>=6.0)
+@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
+extension GRPCStreamStateMachine.OnNextOutboundFrame: @retroactive Equatable {}
+#else
+@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
+extension GRPCStreamStateMachine.OnNextOutboundFrame: Equatable {}
+#endif