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

[Vertex AI] Replace "enum" computed properties with static let #13870

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

andrewheard
Copy link
Contributor

Replaced computed properties with stored type properties (static let) in the structs conforming to ProtoEnum. Minor optimization - no change to the public API surface.

Interesting bit from the Swift documentation:

Stored type properties are lazily initialized on their first access. They’re guaranteed to be initialized only once, even when accessed by multiple threads simultaneously, and they don’t need to be marked with the lazy modifier.

#no-changelog

@andrewheard andrewheard marked this pull request as ready for review October 10, 2024 15:50
@andrewheard andrewheard merged commit 02025ce into main Oct 10, 2024
38 checks passed
@andrewheard andrewheard deleted the ah/vertex-protoenum-lets branch October 10, 2024 15:50
MojtabaHs pushed a commit to MojtabaHs/firebase-ios-sdk that referenced this pull request Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants