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

Remove concrete encode/decode functions #64

Merged
merged 4 commits into from Jan 14, 2019

Conversation

hodovani
Copy link
Contributor

I removed unnecessery typed encode/decode functions in Keyed and Unkeyed Encoder and Decoder. It seems to me that generic functions work well and we don't need to have these ones.

@regexident could you please comment this solution.

@hodovani hodovani self-assigned this Jan 10, 2019
@MaxDesiatov MaxDesiatov changed the title Remove generic encode/decode functions Remove concrete encode/decode functions Jan 10, 2019
@codecov
Copy link

codecov bot commented Jan 10, 2019

Codecov Report

Merging #64 into master will increase coverage by 2.22%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
+ Coverage    74.7%   76.93%   +2.22%     
==========================================
  Files          31       31              
  Lines        1550     1396     -154     
==========================================
- Hits         1158     1074      -84     
+ Misses        392      322      -70
Impacted Files Coverage Δ
...XMLCoder/Encoder/XMLUnkeyedEncodingContainer.swift 31.42% <ø> (+17.67%) ⬆️
...XMLCoder/Decoder/XMLUnkeyedDecodingContainer.swift 15.23% <ø> (-10.3%) ⬇️
...s/XMLCoder/Decoder/XMLKeyedDecodingContainer.swift 82.5% <ø> (-2.61%) ⬇️
...s/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift 40.42% <ø> (-19.36%) ⬇️

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 da68480...a61f9b5. Read the comment docs.

@MaxDesiatov
Copy link
Collaborator

This is a fantastic spot, thanks @hodovani! it never occurred to me that these functions might have a default implementation. It also looks like this on average slightly improves performance 🤩

screen shot 2019-01-10 at 12 34 08

@MaxDesiatov MaxDesiatov assigned MaxDesiatov and unassigned hodovani Jan 13, 2019
@hodovani hodovani merged commit 7583691 into master Jan 14, 2019
@delete-merged-branch delete-merged-branch bot deleted the delete-non-generic-functions branch January 14, 2019 10:02
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.

None yet

2 participants