mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-18 14:47:15 +00:00
applyDiff: Diff
This commit is contained in:
parent
60bdb59d71
commit
59428140a8
@ -2,6 +2,8 @@
|
||||
|
||||
## 0.12.15
|
||||
|
||||
* `Common`:
|
||||
* `applyDiff` will return `Diff` object since this release
|
||||
* `Coroutines`:
|
||||
* Add `Flow` extensions `flatMap`, `flatMapNotNull` and `flatten`
|
||||
* Add `Flow` extensions `takeNotNull` and `filterNotNull`
|
||||
|
@ -173,7 +173,7 @@ inline fun <T> Iterable<T>.calculateStrictDiff(
|
||||
fun <T> MutableList<T>.applyDiff(
|
||||
source: Iterable<T>,
|
||||
strictComparison: Boolean = false
|
||||
) = calculateDiff(source, strictComparison).let {
|
||||
): Diff<T> = calculateDiff(source, strictComparison).also {
|
||||
for (i in it.removed.indices.sortedDescending()) {
|
||||
removeAt(it.removed[i].index)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user