From 7f1b5aadf04b86bb643b68dfbb6ab06aee652660 Mon Sep 17 00:00:00 2001 From: Privacy Sandbox Team Date: Mon, 9 Dec 2024 17:17:25 -0500 Subject: [PATCH] fix: Improve clarity of struct initializer Bug: N/A Change-Id: I9a48b0a583102ec7bdb0a771e095942a88fde32b GitOrigin-RevId: 56cd2ac81929690a24edce4d2899a2ad9438df5b --- src/concurrent/event_engine_executor.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/concurrent/event_engine_executor.cc b/src/concurrent/event_engine_executor.cc index 63435f14..8885bc27 100644 --- a/src/concurrent/event_engine_executor.cc +++ b/src/concurrent/event_engine_executor.cc @@ -30,16 +30,16 @@ TaskId EventEngineExecutor::RunAfter(const absl::Duration duration, grpc_event_engine::experimental::EventEngine::TaskHandle task_handle = event_engine_->RunAfter(ToChronoNanoseconds(duration), std::move(closure)); - - return {task_handle.keys[0], task_handle.keys[1]}; + return { + .keys = {task_handle.keys[0], task_handle.keys[1]}, + }; } bool EventEngineExecutor::Cancel(TaskId task_id) { - grpc_event_engine::experimental::EventEngine::TaskHandle handle = { - task_id.keys[0], - task_id.keys[1], - }; - return event_engine_->Cancel(handle); + return event_engine_->Cancel( + grpc_event_engine::experimental::EventEngine::TaskHandle{ + .keys = {task_id.keys[0], task_id.keys[1]}, + }); } } // namespace privacy_sandbox::server_common