diff --git a/Sources/Factory/Factory/Registrations.swift b/Sources/Factory/Factory/Registrations.swift index 06f5027b..df996e6a 100644 --- a/Sources/Factory/Factory/Registrations.swift +++ b/Sources/Factory/Factory/Registrations.swift @@ -247,6 +247,7 @@ public struct FactoryRegistration: Sendable { /// - options: Reset option: .all, .registration, .scope, .none /// - id: ID of item to remove from the appropriate cache. internal func reset(options: FactoryResetOptions) { + guard options != .none else { return } defer { globalRecursiveLock.unlock() } globalRecursiveLock.lock() let manager = container.manager diff --git a/Sources/FactoryKit/FactoryKit/Registrations.swift b/Sources/FactoryKit/FactoryKit/Registrations.swift index 06f5027b..df996e6a 100644 --- a/Sources/FactoryKit/FactoryKit/Registrations.swift +++ b/Sources/FactoryKit/FactoryKit/Registrations.swift @@ -247,6 +247,7 @@ public struct FactoryRegistration: Sendable { /// - options: Reset option: .all, .registration, .scope, .none /// - id: ID of item to remove from the appropriate cache. internal func reset(options: FactoryResetOptions) { + guard options != .none else { return } defer { globalRecursiveLock.unlock() } globalRecursiveLock.lock() let manager = container.manager