mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[PR #206] [MERGED] Pass parameters by reference and use iterators wherever possible #312
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#312
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ramsayleung/rspotify/pull/206
Author: @ramsayleung
Created: 4/26/2021
Status: ✅ Merged
Merged: 4/28/2021
Merged by: @marioortizmanero
Base:
master← Head:ramsay_pass_parameters_by_reference📝 Commits (10+)
5fc8c8ePass parameter by reference instead of by value.94a792cUpdate CHANGELOG.md6e5206cUpdate tests to pass parameters by reference78962cdReplace for loop with iterator6d0ee2dMerge branch 'master' into ramsay_pass_parameters_by_reference29625fdReplace slice reference with IntoIterator1488532Fix compilation errordf8d58aUpdate CHANGELOG.md926077cRemoved useless tests and optimize code51b8b4aremove explicit type declaration📊 Changes
4 files changed (+83 additions, -59 deletions)
View changed files
📝
CHANGELOG.md(+16 -0)📝
src/client.rs(+44 -35)📝
tests/test_with_credential.rs(+1 -1)📝
tests/test_with_oauth.rs(+22 -23)📄 Description
Description
Currently the parameters mostly are passed by value, which means the compiler will
Copythe 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.
How Has This Been Tested?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.