From 09a0957d4ba4df7b95ed69eeae424f2fc66546e3 Mon Sep 17 00:00:00 2001 From: Mykyta Konopelko Date: Wed, 18 Sep 2024 18:07:27 +0300 Subject: [PATCH] fix Swift 5.9 features --- Source/Helpers/Image+Helpers.swift | 2 +- Source/Spy/SpyableImpl.swift | 6 +++--- Source/Stub/StubbableImpl.swift | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Helpers/Image+Helpers.swift b/Source/Helpers/Image+Helpers.swift index 81bb196..27e561b 100644 --- a/Source/Helpers/Image+Helpers.swift +++ b/Source/Helpers/Image+Helpers.swift @@ -31,7 +31,7 @@ public extension Image { } public extension Image.spry { - #if os(macOS) && swift(>=5.9) + #if os(macOS) && swift(>=6.0) nonisolated(unsafe) static let testImage: Image = .init(systemSymbolName: "circle", accessibilityDescription: nil)! nonisolated(unsafe) static let testImage1: Image = .init(systemSymbolName: "square", accessibilityDescription: nil)! nonisolated(unsafe) static let testImage2: Image = .init(systemSymbolName: "diamond", accessibilityDescription: nil)! diff --git a/Source/Spy/SpyableImpl.swift b/Source/Spy/SpyableImpl.swift index f374916..e3d89c6 100644 --- a/Source/Spy/SpyableImpl.swift +++ b/Source/Spy/SpyableImpl.swift @@ -1,8 +1,8 @@ import Foundation -/// A global NSMapTable to hold onto calls for types conforming to Spyable. This map table has "weak to strong objects" options. -/// -/// - Important: Do NOT use this object. +// A global NSMapTable to hold onto calls for types conforming to Spyable. This map table has "weak to strong objects" options. +// +// - Important: Do NOT use this object. #if swift(>=6.0) private nonisolated(unsafe) var callsMapTable: NSMapTable> = NSMapTable.weakToStrongObjects() #else diff --git a/Source/Stub/StubbableImpl.swift b/Source/Stub/StubbableImpl.swift index 60cce85..6371568 100644 --- a/Source/Stub/StubbableImpl.swift +++ b/Source/Stub/StubbableImpl.swift @@ -1,8 +1,8 @@ import Foundation -/// A global NSMapTable to hold onto stubs for types conforming to Stubbable. This map table has "weak to strong objects" options. -/// -/// - Important: Do NOT use this object. +// A global NSMapTable to hold onto stubs for types conforming to Stubbable. This map table has "weak to strong objects" options. +// +// - Important: Do NOT use this object. #if swift(>=6.0) private nonisolated(unsafe) var stubsMapTable: NSMapTable> = NSMapTable.weakToStrongObjects() #else