Skip to content

Commit 3a3f78b

Browse files
committed
[Distributed] Remove decodeNextArgument from protocol requirements
It's an ad-hoc requirement that has to be checked by the compiler, since it requires knowledge about a concrete serialization requirement type associated with a particular distributed actor system.
1 parent b43d341 commit 3a3f78b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

stdlib/public/Distributed/DistributedActorSystem.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ extension DistributedActorSystem {
285285
let returnType = try invocationDecoder.decodeReturnType() ?? returnTypeFromTypeInfo
286286
// let errorType = try invocation.decodeErrorType() // TODO: decide how to use?
287287

288-
var decoderAny = invocationDecoder as Any
289288
// Execute the target!
290289
try await _executeDistributedTarget(
291290
on: actor,
@@ -419,12 +418,7 @@ public protocol DistributedTargetInvocationDecoder : AnyObject {
419418
// /// buffer for all the arguments and their expected types. The 'pointer' passed here is a pointer
420419
// /// to a "slot" in that pre-allocated buffer. That buffer will then be passed to a thunk that
421420
// /// performs the actual distributed (local) instance method invocation.
422-
// mutating func decodeNextArgument<Argument: SerializationRequirement>(
423-
// into pointer: UnsafeMutablePointer<Argument> // pointer to our hbuffer
424-
// ) throws
425-
426-
// FIXME(distributed): remove this since it must have the ': SerializationRequirement'
427-
func decodeNextArgument<Argument>() throws -> Argument
421+
// mutating func decodeNextArgument<Argument: SerializationRequirement>() throws -> Argument
428422

429423
func decodeErrorType() throws -> Any.Type?
430424

0 commit comments

Comments
 (0)