Skip to content

Commit 6aa78ec

Browse files
committed
simplify doRoutine function
1 parent 9616bda commit 6aa78ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Mach/Core/Messaging/MIG/MIGClient.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ extension Mach {
4040
public func doRoutine<ReplyPayload: Mach.MIGPayload>(
4141
_ routineIndex: mach_msg_id_t,
4242
request: MIGRequest<some Mach.MIGPayload>,
43-
replyPayloadType: ReplyPayload.Type,
44-
replyPort: Mach.Port?
43+
replyPayloadType: ReplyPayload.Type = ReplyPayload.self,
44+
replyPort: Mach.Port? = nil
4545
) throws -> Mach.MIGReply<ReplyPayload> {
4646
let routineId = self.baseRoutineId + routineIndex
4747
request.header.msgh_id = routineId

0 commit comments

Comments
 (0)