Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate .set .list and .map in favour of asList, asSet and asMap #85

Merged
merged 15 commits into from
Mar 26, 2019

Conversation

passsy
Copy link
Owner

@passsy passsy commented Mar 25, 2019

Deprecated KtList.list: List, added KtList.asList(): List
Deprecated KtSet.set: Set, added KtSet.asSet(): Set
Removed KtMap.map: Map, added KtMap.asMap(): Map

Added KtMap<K, V>.iter: Iterable<MapEntry<K, V>> which makes it possible KtMaps in for-loops.

final pokemon = mutableMapFrom({1: "Bulbasaur", 2: "Ivysaur"});

for (final p in pokemon.iter) {
  print("${p.key} -> ${p.value}"); 
}

// 1 -> Ditto
// 2 -> Ivysaur

fixes #79

@codecov
Copy link

codecov bot commented Mar 26, 2019

Codecov Report

Merging #85 into master will increase coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   99.71%   99.83%   +0.11%     
==========================================
  Files          40       41       +1     
  Lines        1774     1826      +52     
==========================================
+ Hits         1769     1823      +54     
+ Misses          5        3       -2
Impacted Files Coverage Δ
lib/src/collection/impl/iterator.dart 100% <ø> (ø) ⬆️
lib/src/collection/kt_map.dart 100% <ø> (ø) ⬆️
lib/src/collection/kt_list.dart 100% <ø> (ø) ⬆️
lib/src/collection/kt_list_mutable.dart 100% <ø> (ø) ⬆️
lib/src/collection/kt_map_mutable.dart 100% <ø> (ø) ⬆️
lib/src/collection/kt_set.dart 100% <ø> (ø) ⬆️
lib/src/collection/kt_set_mutable.dart 100% <ø> (ø) ⬆️
...rc/collection/impl/dart_unmodifiable_set_view.dart 100% <100%> (ø)
lib/src/collection/impl/map_mutable.dart 100% <100%> (+1.44%) ⬆️
lib/src/collection/impl/set.dart 100% <100%> (ø) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35c30b1...59a9191. Read the comment docs.

@passsy passsy merged commit 45045df into master Mar 26, 2019
@passsy passsy deleted the feature/as-methods branch March 26, 2019 14:40
@passsy passsy mentioned this pull request Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KtMap.map(MapEntry<K, V> -> R) : KtList<R>
1 participant