Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup(generator): remove unused var #14517

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

dbolduc
Copy link
Member

@dbolduc dbolduc commented Jul 20, 2024

Part of the work for #14510

This was being set to a nonsense value, so stop setting it and checking for it.

This is how we use the method_request_params variable:

if (HasHttpRoutingHeader(method)) {
return absl::StrCat(" SetMetadata(", context, ", ", options,
", absl::StrCat($method_request_params$));");
}

Note that HasHttpRoutingHeader() == false when something is a HttpSimpleInfo.

bool HasHttpRoutingHeader(MethodDescriptor const& method) {
auto result = ParseHttpExtension(method);
return absl::holds_alternative<HttpExtensionInfo>(result);
}


This change is Reviewable

@dbolduc dbolduc marked this pull request as ready for review July 20, 2024 17:49
@dbolduc dbolduc requested a review from a team as a code owner July 20, 2024 17:49
Copy link

codecov bot commented Jul 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.59%. Comparing base (a86e887) to head (9e1b409).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14517   +/-   ##
=======================================
  Coverage   93.58%   93.59%           
=======================================
  Files        2316     2316           
  Lines      207108   207105    -3     
=======================================
+ Hits       193826   193833    +7     
+ Misses      13282    13272   -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dbolduc dbolduc merged commit 40b2ac6 into googleapis:main Jul 20, 2024
63 checks passed
@dbolduc dbolduc deleted the cleanup-generator-unused-variable branch July 20, 2024 19:37
cuiy0006 pushed a commit to cuiy0006/google-cloud-cpp that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants