diff --git a/Package.swift b/Package.swift index 905f676..facffa8 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.0 +// swift-tools-version: 6.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/README.md b/README.md index 3e0d1a9..f187167 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Build](https://github.com/codefiesta/VimKit/actions/workflows/swift.yml/badge.svg) ![Xcode 16.4+](https://img.shields.io/badge/Xcode-16.4%2B-gold.svg) -![Swift 6.0+](https://img.shields.io/badge/Swift-6.0%2B-tomato.svg) +![Swift 6.1+](https://img.shields.io/badge/Swift-6.1%2B-tomato.svg) ![iOS 18.0+](https://img.shields.io/badge/iOS-18.0%2B-crimson.svg) ![visionOS 2.0+](https://img.shields.io/badge/visionOS-2.0%2B-magenta.svg) ![macOS 15.0+](https://img.shields.io/badge/macOS-15.0%2B-skyblue.svg) diff --git a/Sources/VimKit/Database+Importer.swift b/Sources/VimKit/Database+Importer.swift index 514ee3a..2ee6397 100644 --- a/Sources/VimKit/Database+Importer.swift +++ b/Sources/VimKit/Database+Importer.swift @@ -177,7 +177,7 @@ extension Database { /// - modelType: the type of model private func warmCache(_ modelType: any IndexedPersistentModel.Type) { guard let table = database.tables[modelType.modelName] else { return } - modelType.warm(table: table, cache: cache) + _ = modelType.warm(table: table, cache: cache) } /// Imports models of the specified type into the model container. diff --git a/Sources/VimKit/Database+Models.swift b/Sources/VimKit/Database+Models.swift index e8ce77f..bb535ff 100644 --- a/Sources/VimKit/Database+Models.swift +++ b/Sources/VimKit/Database+Models.swift @@ -69,6 +69,7 @@ extension IndexedPersistentModel { /// - table: the database table that contains the raw data /// - cache: the cache to warm /// - Returns: the cached objects. + @discardableResult static func warm(table: Database.Table, cache: Database.ImportCache) -> [Self] { cache.warm(table) }