[Vertex AI] Silence SafetyRating: Comparable
warning in tests
#13635
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.
Silenced the followed warning on on
extension SafetyRating: Comparable
:SafetyRating
does not have a natural ordering because its propertylet category: SafetySetting.HarmCategory
does not (e.g.,dangerousContent
can't be compared as being greater than or equal toharassment
):firebase-ios-sdk/FirebaseVertexAI/Sources/Safety.swift
Lines 84 to 102 in 9e53732
For this reason, it is reasonable to assume that we will not add
Comparable
conformance toSafetyRating
in the SDK and the warning can be ignored withSwift.Comparable
in the unit-test.Note:
Swift.Comparable
is equivalent to@retroactive Comparable
but is supported prior to Swift 6 (see SE-0364 for more details).#no-changelog