RUM-4342 simplify generic type in mappers#2015
Merged
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2015 +/- ##
===========================================
- Coverage 83.53% 83.48% -0.05%
===========================================
Files 478 478
Lines 17531 17578 +47
Branches 2661 2672 +11
===========================================
+ Hits 14643 14674 +31
- Misses 2164 2177 +13
- Partials 724 727 +3
|
0xnm
approved these changes
Apr 30, 2024
mariusc83
approved these changes
May 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
On SR mappers, we added a generic type argument to tell the type of wireframe we output. In practice, this became useless as the map method returns a list of wireframe, more often than not of different types, meaning almost every implementation uses the most generic type as an argument (MobileSegment.Wireframe instead of ImageWireframe or TextWireframe), and the actual type is never used in calling methods.
In addition, we have to use some unchecked casts when creating the list of mappers, e.g.:
This PR aims at simplifying this part.