Skip to content

Commit

Permalink
Change averageRating deprecation to a documentation comment (#313)
Browse files Browse the repository at this point in the history
- Compiler flag to treat warnings as errors is active so we cannot make use of this without incurring an error
  • Loading branch information
aokj4ck authored Sep 3, 2024
1 parent 6c8b8bb commit 5a121c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ protocol CoreResultMetadataProtocol {
/** Long form detailed description for POI. */
var description: String? { get }

/** The average rating of the location, on a scale from 1 to 5. */
@available(*, deprecated, renamed: "rating", message: "Please use the rating field for this value")
/** The average rating of the location, on a scale from 1 to 5.
**Deprecated**: Please use the ``rating`` field for this value. */
var averageRating: NSNumber? { get }

/** The average rating of the location, on a scale from 1 to 5. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ class SearchCategorySuggestionImpl: SearchCategorySuggestion, CoreResponseProvid
self.batchResolveSupported = coreResult.action?.multiRetrievable ?? false
self.categories = coreResult.categories
self.categoryIDs = coreResult.categoryIDs
NSLog("@@ categories is \(coreResult.categories)")
NSLog("@@ category IDs is \(coreResult.categoryIDs)")

self.descriptionText = coreResult.addressDescription
self.estimatedTime = coreResult.estimatedTime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public struct SearchResultMetadata: Codable, Hashable {
public var rating: Double?

/// The average rating of the location, on a scale from 1 to 5.
@available(*, deprecated, renamed: "rating", message: "Please use the rating field for this value")
/// **Deprecated**: Please use the ``rating`` field for this value.
public var averageRating: Double?

/// Business opening hours
Expand Down

0 comments on commit 5a121c7

Please sign in to comment.