perf: optimize featured cross-country trip generation and add tests
This commit is contained in:
@@ -154,7 +154,7 @@ final class AppDataProvider: ObservableObject {
|
||||
throw DataProviderError.contextNotConfigured
|
||||
}
|
||||
|
||||
let sportStrings = sports.map { $0.rawValue }
|
||||
let sportStrings = Set(sports.map(\.rawValue))
|
||||
|
||||
let descriptor = FetchDescriptor<CanonicalGame>(
|
||||
predicate: #Predicate<CanonicalGame> { game in
|
||||
@@ -179,7 +179,7 @@ final class AppDataProvider: ObservableObject {
|
||||
throw DataProviderError.contextNotConfigured
|
||||
}
|
||||
|
||||
let sportStrings = sports.map { $0.rawValue }
|
||||
let sportStrings = Set(sports.map(\.rawValue))
|
||||
|
||||
let descriptor = FetchDescriptor<CanonicalGame>(
|
||||
predicate: #Predicate<CanonicalGame> { game in
|
||||
|
||||
Reference in New Issue
Block a user