Fix nonisolated model warnings
This commit is contained in:
parent
9996161cf5
commit
ac871333ba
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
enum PackIdentitySource: String, Hashable, Sendable {
|
nonisolated enum PackIdentitySource: String, Hashable, Sendable {
|
||||||
case manifestUUID
|
case manifestUUID
|
||||||
case fallback
|
case fallback
|
||||||
}
|
}
|
||||||
|
|
||||||
struct PackIdentity: Hashable, Sendable, Identifiable {
|
nonisolated struct PackIdentity: Hashable, Sendable, Identifiable {
|
||||||
let type: MinecraftContentType
|
let type: MinecraftContentType
|
||||||
let uuid: String?
|
let uuid: String?
|
||||||
let version: 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 id: URL
|
||||||
let itemID: URL
|
let itemID: URL
|
||||||
let sourceID: URL
|
let sourceID: URL
|
||||||
@ -105,7 +105,7 @@ struct PackInstance: Identifiable, Hashable, Sendable {
|
|||||||
let hostWorldItemID: URL?
|
let hostWorldItemID: URL?
|
||||||
}
|
}
|
||||||
|
|
||||||
struct LogicalPack: Identifiable, Hashable, Sendable {
|
nonisolated struct LogicalPack: Identifiable, Hashable, Sendable {
|
||||||
let id: PackIdentity
|
let id: PackIdentity
|
||||||
let contentType: MinecraftContentType
|
let contentType: MinecraftContentType
|
||||||
let displayName: String
|
let displayName: String
|
||||||
@ -116,14 +116,14 @@ struct LogicalPack: Identifiable, Hashable, Sendable {
|
|||||||
let isSuspicious: Bool
|
let isSuspicious: Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
struct LogicalWorld: Identifiable, Hashable, Sendable {
|
nonisolated struct LogicalWorld: Identifiable, Hashable, Sendable {
|
||||||
let id: URL
|
let id: URL
|
||||||
let itemID: URL
|
let itemID: URL
|
||||||
let usedPackIDs: [PackIdentity]
|
let usedPackIDs: [PackIdentity]
|
||||||
let unresolvedReferences: [ContentPackReference]
|
let unresolvedReferences: [ContentPackReference]
|
||||||
}
|
}
|
||||||
|
|
||||||
struct WorldPackRelationship: Identifiable, Hashable, Sendable {
|
nonisolated struct WorldPackRelationship: Identifiable, Hashable, Sendable {
|
||||||
let worldItemID: URL
|
let worldItemID: URL
|
||||||
let logicalPackID: PackIdentity?
|
let logicalPackID: PackIdentity?
|
||||||
let reference: ContentPackReference
|
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 id: URL
|
||||||
let relativePath: String
|
let relativePath: String
|
||||||
let modifiedDate: Date?
|
let modifiedDate: Date?
|
||||||
@ -146,7 +146,7 @@ struct ItemSnapshot: Identifiable, Hashable, Sendable, Codable {
|
|||||||
let packVersion: String?
|
let packVersion: String?
|
||||||
}
|
}
|
||||||
|
|
||||||
struct CollectionSnapshot: Identifiable, Hashable, Sendable, Codable {
|
nonisolated struct CollectionSnapshot: Identifiable, Hashable, Sendable, Codable {
|
||||||
let folderName: String
|
let folderName: String
|
||||||
let modifiedDate: Date?
|
let modifiedDate: Date?
|
||||||
let childDirectoryCount: Int
|
let childDirectoryCount: Int
|
||||||
@ -155,7 +155,7 @@ struct CollectionSnapshot: Identifiable, Hashable, Sendable, Codable {
|
|||||||
var id: String { folderName }
|
var id: String { folderName }
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SourceSnapshot: Hashable, Sendable, Codable {
|
nonisolated struct SourceSnapshot: Hashable, Sendable, Codable {
|
||||||
let sourceID: URL
|
let sourceID: URL
|
||||||
let rootModifiedDate: Date?
|
let rootModifiedDate: Date?
|
||||||
let collectionSnapshots: [CollectionSnapshot]
|
let collectionSnapshots: [CollectionSnapshot]
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct MinecraftSource: Identifiable, Hashable, Sendable {
|
nonisolated struct MinecraftSource: Identifiable, Hashable, Sendable {
|
||||||
let id: URL
|
let id: URL
|
||||||
let folderURL: URL
|
let folderURL: URL
|
||||||
var origin: MinecraftSourceOrigin
|
var origin: MinecraftSourceOrigin
|
||||||
@ -197,7 +197,7 @@ nonisolated private func normalizedSourceURL(_ url: URL) -> URL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private extension Array {
|
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 seen = Set<Key>()
|
||||||
var result: [Element] = []
|
var result: [Element] = []
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct SourceCapabilities: Hashable, Sendable, Codable {
|
nonisolated struct SourceCapabilities: Hashable, Sendable, Codable {
|
||||||
var canScan: Bool = true
|
var canScan: Bool = true
|
||||||
var canMaterializeItems: Bool = true
|
var canMaterializeItems: Bool = true
|
||||||
var canExportPortablePackages: Bool = true
|
var canExportPortablePackages: Bool = true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user