Repository navigation
fix: qualify ToProto calls on foreign receivers - #7437
Merged
Merged
Conversation
Calls such as `self.code.to_proto()` rely on inference to pick the `ToProto<T>` impl for a type defined in another crate. If a future release of that crate adds a second impl for the same type, these calls become ambiguous and stop compiling. Name the trait parameter explicitly, as the generated code already does.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates several calls to '.to_proto()' across the 'firestore', 'pubsub', and 'storage' crates to use explicit fully-qualified trait syntax (e.g., 'ToProto::::to_proto(...)') instead of method call syntax. This resolves type inference ambiguities for the 'ToProto' trait conversions. I have no feedback to provide as the changes are straightforward and correct.
dbolduc
approved these changes
Nov 10, 2026
suzmue
enabled auto-merge (squash)
November 10, 2026 22:36
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7437 +/- ##
=======================================
Coverage 98.66% 98.66%
=======================================
Files 334 334
Lines 147687 147688 +1
=======================================
+ Hits 145722 145723 +1
Misses 1965 1965 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calls such as
self.code.to_proto()rely on inference to pick theToProto<T>impl for a type defined in another crate. If a future release of that crate adds a second impl for the same type, these calls become ambiguous and stop compiling. Name the trait parameter explicitly, as the generated code already does.For #7284