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 needless collect to Vec in JsonMapTrait<'json, json::JsonValue> #11

Merged
merged 1 commit into from
Jul 27, 2019

Conversation

macisamuele
Copy link
Owner

PR #7 relaxed the constraint associated to the iterator types returned by JsonMapTrait.
Thanks to it we don't actually need to have .collect().into_iter() which actually implies:

  • needless memory allocation
  • processing time (to duplicate materialise the items into the new memory location)

Even if we would not have relaxed the iterator type we might have had the possibility to remove it as json>=0.11.14 does return ExactSizeIterator ;)

@codecov
Copy link

codecov bot commented Jul 27, 2019

Codecov Report

Merging #11 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #11   +/-   ##
=======================================
  Coverage   95.19%   95.19%           
=======================================
  Files           8        8           
  Lines         687      687           
=======================================
  Hits          654      654           
  Misses         33       33
Impacted Files Coverage Δ
src/traits/_json.rs 98.09% <100%> (ø) ⬆️

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 a8c6bdd...7673f0a. Read the comment docs.

@macisamuele macisamuele merged commit bf6c64b into master Jul 27, 2019
@macisamuele macisamuele deleted the maci-simplify-JsonMapTrait-for-json-feature branch July 27, 2019 21:20
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.

1 participant