From 3656db2ef81bfc27349c6639f376b9155be76229 Mon Sep 17 00:00:00 2001 From: Denys Telezhkin Date: Wed, 24 Feb 2016 14:03:13 +0200 Subject: [PATCH] replaceItem(_:replacingItem:) method no longer requires second argument to be Equatable --- CHANGELOG.md | 6 ++++++ DTModelStorage.podspec | 2 +- DTModelStorage/Sources/Core/MemoryStorage.swift | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0585201f..8260e245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Change Log All notable changes to this project will be documented in this file. +## [2.4.2](https://github.com/DenHeadless/DTModelStorage/releases/tag/2.4.2) + +### Changed + +* `replaceItem(_:replacingItem:)` method no longer requires second argument to be Equatable. + ## [2.4.1](https://github.com/DenHeadless/DTModelStorage/releases/tag/2.4.1) ### Changed diff --git a/DTModelStorage.podspec b/DTModelStorage.podspec index 91beab4a..0a76c5af 100644 --- a/DTModelStorage.podspec +++ b/DTModelStorage.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DTModelStorage' - s.version = '2.4.1' + s.version = '2.4.2' s.license = 'MIT' s.summary = 'Storage classes for datasource based controls.' s.homepage = 'https://github.com/DenHeadless/DTModelStorage' diff --git a/DTModelStorage/Sources/Core/MemoryStorage.swift b/DTModelStorage/Sources/Core/MemoryStorage.swift index cc81897c..73d412aa 100644 --- a/DTModelStorage/Sources/Core/MemoryStorage.swift +++ b/DTModelStorage/Sources/Core/MemoryStorage.swift @@ -236,7 +236,7 @@ public class MemoryStorage: BaseStorage, StorageProtocol /// - Parameter itemToReplace: item to replace /// - Parameter replacingItem: replacing item /// - Throws: if `itemToReplace` is not found, will throw MemoryStorageErrors.Replacement.ItemNotFound - public func replaceItem(itemToReplace: T, replacingItem: U) throws + public func replaceItem(itemToReplace: T, replacingItem: Any) throws { self.startUpdate() defer { self.finishUpdate() }