@@ -25,13 +25,13 @@ class ResponseFuture final {
2525 // / @brief Checks if the asynchronous call has completed.
2626 // / Note, that once user gets result, IsReady should not be called.
2727 // / @return true if result ready.
28- [[nodiscard]] bool IsReady () const { return future_-> IsReady (); }
28+ [[nodiscard]] bool IsReady () const { return future_. IsReady (); }
2929
3030 // / @brief Await response until specified timepoint.
3131 // /
3232 // / @throws ugrpc::client::RpcError on an RPC error.
3333 [[nodiscard]] engine::FutureStatus WaitUntil (engine::Deadline deadline) const noexcept {
34- return future_-> WaitUntil (deadline);
34+ return future_. WaitUntil (deadline);
3535 }
3636
3737 // / @brief Await and read the response.
@@ -43,19 +43,16 @@ class ResponseFuture final {
4343 // / @returns the response on success.
4444 // / @throws ugrpc::client::RpcError on an RPC error.
4545 // / @throws ugrpc::client::RpcCancelledError on task cancellation.
46- Response Get () {
47- const auto response = future_->Get ();
48- return proto_structs::MessageToStruct (response);
49- }
46+ Response Get () { return proto_structs::MessageToStruct<Response>(future_.Get ()); }
5047
5148 // / @brief Cancel call.
52- void Cancel () { return future_-> Cancel (); }
49+ void Cancel () { return future_. Cancel (); }
5350
5451 // / @brief Get call context, useful e.g. for accessing metadata.
55- ugrpc::client::CallContext& GetContext () { return future_-> GetContext (); }
52+ ugrpc::client::CallContext& GetContext () { return future_. GetContext (); }
5653
5754 // / @overload
58- const ugrpc::client::CallContext& GetContext () const { return future_-> GetContext (); }
55+ const ugrpc::client::CallContext& GetContext () const { return future_. GetContext (); }
5956
6057private:
6158 VanillaFuture future_;
0 commit comments