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

Fix signature of mapNotNull and friends #197

Merged
merged 2 commits into from
Mar 20, 2023

Conversation

passsy
Copy link
Owner

@passsy passsy commented Mar 20, 2023

Fixes #192

Move filterNotNullTo, mapIndexedNotNull, mapIndexedNotNullTo, mapNotNull, mapNotNullTo from
extension RequireNoNullsKtIterableExtension<T> on KtIterable<T?> to
extension KtIterableExtensions<T> on KtIterable<T>

Meaning those now work well on non-nullable types.

Only upcasts from T? to T (nullable to non-nullable) stay in RequireNoNullsKtIterableExtension

@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Merging #197 (529665d) into master (9d2abc0) will increase coverage by 0.22%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #197      +/-   ##
==========================================
+ Coverage   99.22%   99.44%   +0.22%     
==========================================
  Files          40       40              
  Lines        1931     2695     +764     
==========================================
+ Hits         1916     2680     +764     
  Misses         15       15              
Flag Coverage Δ
unittests 99.44% <100.00%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/src/collection/kt_iterable.dart 99.63% <100.00%> (+0.08%) ⬆️

... and 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@passsy passsy merged commit 5523897 into master Mar 20, 2023
@passsy passsy deleted the feature/fix_mapNotNull_signature branch March 20, 2023 12:48
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.

The signature of mapNotNull is wrong.
1 participant