mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[PR #200] [MERGED] Replace HashMap<String, String> with HashMap<&str, &str> to reduce allocation #308
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#308
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/200
Author: @ramsayleung
Created: 4/19/2021
Status: ✅ Merged
Merged: 4/19/2021
Merged by: @marioortizmanero
Base:
master← Head:ramsay_reduce_allocation📝 Commits (10+)
cd587b3Change Form type to HashMap<&'a str, &'a str> to reduce allocationaccaf41Fix ureq compile error7b4fba7Reduce allocation for Query payload9d3b282add split-debuginfo flag for dev.0af3d5eDerive AsRefStr trait for enumbd1f7f1Fix cargo fmt error170f5d8fix cargo clippy error9ec94b1Elide unnecessary lifetime57097b7Remove profile.dev96b549eMerge branch 'master' into ramsay_reduce_allocation📊 Changes
9 files changed (+236 additions, -208 deletions)
View changed files
📝
src/client.rs(+164 -134)📝
src/http/mod.rs(+11 -7)📝
src/http/reqwest.rs(+2 -2)📝
src/http/ureq.rs(+3 -3)📝
src/model/enums/country.rs(+2 -2)📝
src/model/enums/misc.rs(+15 -12)📝
src/model/enums/types.rs(+12 -10)📝
src/oauth2.rs(+15 -26)📝
tests/test_enums.rs(+12 -12)📄 Description
Description
Try to fix #127 and #160 , use
HashMap<&str, &str>instead ofHashMap<String, String>to avoid so manyto_stringandto_owned.Motivation and Context
Reduce uncessary allocation.
Dependencies
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
All existing tests pass
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.