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: add EnsureCapacity for dictionary types #361

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

TimothyMakkison
Copy link
Collaborator

@TimothyMakkison TimothyMakkison commented Apr 19, 2023

Resolves #251

  • Modifed a bit of Add ensure capacity for enumerable types. #312 to work with dictionaries.
  • Adjusted ImplementsGeneric to support interface inheritance, added a guard to TryBuildEnsureCapacity because Dictionary does have EnsureCapacity for older versions.
  • Added 3 tests

@codecov-commenter
Copy link

codecov-commenter commented Apr 19, 2023

Codecov Report

Merging #361 (dc6d358) into main (dce4b42) will increase coverage by 0.20%.
The diff coverage is 90.95%.

❗ Current head dc6d358 differs from pull request most recent head 408e847. Consider uploading reports for the commit 408e847 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #361      +/-   ##
==========================================
+ Coverage   91.71%   91.91%   +0.20%     
==========================================
  Files         109      126      +17     
  Lines        3379     3921     +542     
  Branches      438      544     +106     
==========================================
+ Hits         3099     3604     +505     
- Misses        189      210      +21     
- Partials       91      107      +16     
Impacted Files Coverage Δ
src/Nullable.cs 0.00% <ø> (ø)
src/Riok.Mapperly.Abstractions/MapEnumAttribute.cs 100.00% <ø> (ø)
...appingBuilders/DateTimeToDateOnlyMappingBuilder.cs 60.00% <0.00%> (-6.67%) ⬇️
...appingBuilders/DateTimeToTimeOnlyMappingBuilder.cs 60.00% <0.00%> (-6.67%) ⬇️
...criptors/MappingBuilders/ToStringMappingBuilder.cs 100.00% <ø> (ø)
src/Riok.Mapperly/Helpers/DictionaryExtensions.cs 100.00% <ø> (ø)
src/Riok.Mapperly/Helpers/EnumerableExtensions.cs 95.08% <ø> (ø)
...berMappings/MemberNullDelegateAssignmentMapping.cs 53.12% <25.00%> (ø)
...criptors/MappingBuilders/NullableMappingBuilder.cs 91.66% <33.33%> (-2.09%) ⬇️
...bjectFactories/GenericSourceTargetObjectFactory.cs 92.85% <50.00%> (ø)
... and 100 more

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

latonz
latonz previously approved these changes Apr 19, 2023
Copy link
Contributor

@latonz latonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TimothyMakkison thank you for this contribution, looks good!
#343 got merged in the meantime. Rebasing should work without too many conflicts if you first run dotnet tool restore && dotnet csharpier .. We introduced csharpier to unify source code formatting and eliminate discussions around the source code format.

@TimothyMakkison TimothyMakkison force-pushed the dict_ens_cap branch 3 times, most recently from c204c44 to d0adf71 Compare April 19, 2023 13:02
@TimothyMakkison TimothyMakkison marked this pull request as ready for review April 19, 2023 13:03
@latonz latonz merged commit 685d6ee into riok:main Apr 20, 2023
@github-actions
Copy link

🎉 This PR is included in version 2.8.0-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants