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

Pass parameters by reference and use iterators wherever possible #206

Merged
merged 11 commits into from
Apr 28, 2021

Conversation

ramsayleung
Copy link
Owner

Description

Currently the parameters mostly are passed by value, which means the compiler will Copy the parameter when passes them into a method, it's a little inefficient, then pass them by reference instead.

Using iterators wherever possible, since it's more atomic and rusty.

Fixed #127

Motivation and Context

Improve the efficiency of this library.

Dependencies

List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • All existing tests pass.
  • Add some tests for iterator

CHANGELOG.md Outdated Show resolved Hide resolved
tests/test_with_oauth.rs Outdated Show resolved Hide resolved
tests/test_with_oauth.rs Outdated Show resolved Hide resolved
tests/test_with_oauth.rs Outdated Show resolved Hide resolved
src/client.rs Outdated Show resolved Hide resolved
src/client.rs Outdated Show resolved Hide resolved
src/client.rs Show resolved Hide resolved
src/client.rs Outdated Show resolved Hide resolved
src/client.rs Outdated Show resolved Hide resolved
@marioortizmanero marioortizmanero merged commit 0c859ff into master Apr 28, 2021
@marioortizmanero marioortizmanero deleted the ramsay_pass_parameters_by_reference branch April 28, 2021 21:34
@ramsayleung ramsayleung mentioned this pull request Apr 29, 2021
87 tasks
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.

Meta-Issue
2 participants