Fix nonisolated model warnings

This commit is contained in:
John Burwell 2026-06-01 09:02:19 -05:00
parent 9996161cf5
commit ac871333ba
3 changed files with 12 additions and 12 deletions

View File

@ -3,12 +3,12 @@
import Foundation
enum PackIdentitySource: String, Hashable, Sendable {
nonisolated enum PackIdentitySource: String, Hashable, Sendable {
case manifestUUID
case fallback
}
struct PackIdentity: Hashable, Sendable, Identifiable {
nonisolated struct PackIdentity: Hashable, Sendable, Identifiable {
let type: MinecraftContentType
let uuid: String?
let version: String?
@ -96,7 +96,7 @@ struct PackIdentity: Hashable, Sendable, Identifiable {
}
}
struct PackInstance: Identifiable, Hashable, Sendable {
nonisolated struct PackInstance: Identifiable, Hashable, Sendable {
let id: URL
let itemID: URL
let sourceID: URL
@ -105,7 +105,7 @@ struct PackInstance: Identifiable, Hashable, Sendable {
let hostWorldItemID: URL?
}
struct LogicalPack: Identifiable, Hashable, Sendable {
nonisolated struct LogicalPack: Identifiable, Hashable, Sendable {
let id: PackIdentity
let contentType: MinecraftContentType
let displayName: String
@ -116,14 +116,14 @@ struct LogicalPack: Identifiable, Hashable, Sendable {
let isSuspicious: Bool
}
struct LogicalWorld: Identifiable, Hashable, Sendable {
nonisolated struct LogicalWorld: Identifiable, Hashable, Sendable {
let id: URL
let itemID: URL
let usedPackIDs: [PackIdentity]
let unresolvedReferences: [ContentPackReference]
}
struct WorldPackRelationship: Identifiable, Hashable, Sendable {
nonisolated struct WorldPackRelationship: Identifiable, Hashable, Sendable {
let worldItemID: URL
let logicalPackID: PackIdentity?
let reference: ContentPackReference
@ -137,7 +137,7 @@ struct WorldPackRelationship: Identifiable, Hashable, Sendable {
}
}
struct ItemSnapshot: Identifiable, Hashable, Sendable, Codable {
nonisolated struct ItemSnapshot: Identifiable, Hashable, Sendable, Codable {
let id: URL
let relativePath: String
let modifiedDate: Date?
@ -146,7 +146,7 @@ struct ItemSnapshot: Identifiable, Hashable, Sendable, Codable {
let packVersion: String?
}
struct CollectionSnapshot: Identifiable, Hashable, Sendable, Codable {
nonisolated struct CollectionSnapshot: Identifiable, Hashable, Sendable, Codable {
let folderName: String
let modifiedDate: Date?
let childDirectoryCount: Int
@ -155,7 +155,7 @@ struct CollectionSnapshot: Identifiable, Hashable, Sendable, Codable {
var id: String { folderName }
}
struct SourceSnapshot: Hashable, Sendable, Codable {
nonisolated struct SourceSnapshot: Hashable, Sendable, Codable {
let sourceID: URL
let rootModifiedDate: Date?
let collectionSnapshots: [CollectionSnapshot]

View File

@ -3,7 +3,7 @@
import Foundation
struct MinecraftSource: Identifiable, Hashable, Sendable {
nonisolated struct MinecraftSource: Identifiable, Hashable, Sendable {
let id: URL
let folderURL: URL
var origin: MinecraftSourceOrigin
@ -197,7 +197,7 @@ nonisolated private func normalizedSourceURL(_ url: URL) -> URL {
}
private extension Array {
func uniqued<Key: Hashable>(by keyPath: KeyPath<Element, Key>) -> [Element] {
nonisolated func uniqued<Key: Hashable>(by keyPath: KeyPath<Element, Key>) -> [Element] {
var seen = Set<Key>()
var result: [Element] = []

View File

@ -3,7 +3,7 @@
import Foundation
struct SourceCapabilities: Hashable, Sendable, Codable {
nonisolated struct SourceCapabilities: Hashable, Sendable, Codable {
var canScan: Bool = true
var canMaterializeItems: Bool = true
var canExportPortablePackages: Bool = true