onmyway133 / DeepDiff

🦀Amazingly incredible extraordinary lightning fast diffing in Swift
https://onmyway133.com/apps/
Other
2.05k stars 145 forks source link

Change<T> could use a .map(...) method. #34

Open jrogccom opened 5 years ago

jrogccom commented 5 years ago

I made a PR to this end. It can be useful when looking at changes while hiding private implementation. See https://github.com/onmyway133/DeepDiff/pull/33 .

PhilipDukhov commented 4 years ago

+1 to this Could you apply this pull request? I can't even make it locally in my project cause Insert<T>, Delete<T>, Replace<T> and Move<T> don't have public initializers😌

Beside that reload<T: DiffAware>(changes: ..)doesn't need to require T to be DiffAware. Maybe I'm missing something, but we don't need to store items inside Insert<T>, Delete<T>, Replace<T> and Move<T>, as we only calculate indexes from those.

Why do I need it? I have a data model, that is : DiffAware, but my table wrapper object that configures the cells can't be made : DiffAware.