[PR #294] [MERGED] Update to rust edition 2021 #379

Closed
opened 2026-02-27 20:24:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/294
Author: @ramsayleung
Created: 12/25/2021
Status: Merged
Merged: 7/31/2022
Merged by: @marioortizmanero

Base: masterHead: ramsay_update_to_rust2021


📝 Commits (3)

  • 3502776 migrate to rust-2021
  • 54f8397 add rust-version
  • 42e7328 Merge branch 'master' into ramsay_update_to_rust2021

📊 Changes

1 file changed (+2 additions, -4 deletions)

View changed files

📝 Cargo.toml (+2 -4)

📄 Description

Description

Update to Rust edition 202

Motivation and Context

Trying to close #275, by the way, as for this:

Try removing the build_map and build_json macros now that HashMap::from([(a,b), (c,d)]) is possible (only in case it looks great).

I think it's necessary to keep build_json and build_map macros, since the current optional semantics can't be replaced with the built-in HashMap::from method:

        let params = build_map! {
            optional "album_type": album_type.map(|x| x.as_ref()),
            optional "market": market.map(|x| x.as_ref()),
            optional "limit": limit.as_deref(),
            optional "offset": offset.as_deref(),
        };

Dependencies

None

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 CI checks should pass

Is this change properly documented?

I think it's not necessary to add this to CHANGELOG

Last but not least, Merry Christmas :-)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ramsayleung/rspotify/pull/294 **Author:** [@ramsayleung](https://github.com/ramsayleung) **Created:** 12/25/2021 **Status:** ✅ Merged **Merged:** 7/31/2022 **Merged by:** [@marioortizmanero](https://github.com/marioortizmanero) **Base:** `master` ← **Head:** `ramsay_update_to_rust2021` --- ### 📝 Commits (3) - [`3502776`](https://github.com/ramsayleung/rspotify/commit/3502776d7c591549dee6c4e327aadf99f271fdde) migrate to rust-2021 - [`54f8397`](https://github.com/ramsayleung/rspotify/commit/54f83973910a6b9239b1647a7fd6e54980dc1ccb) add rust-version - [`42e7328`](https://github.com/ramsayleung/rspotify/commit/42e7328a5d3396080fad95a954c1f5a3e39642b5) Merge branch 'master' into ramsay_update_to_rust2021 ### 📊 Changes **1 file changed** (+2 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.toml` (+2 -4) </details> ### 📄 Description ## Description Update to Rust edition 202 ## Motivation and Context Trying to close #275, by the way, as for this: > Try removing the build_map and build_json macros now that HashMap::from([(a,b), (c,d)]) is possible (only in case it looks great). I think it's necessary to keep `build_json` and `build_map` macros, since the current `optional` semantics can't be replaced with the built-in `HashMap::from` method: ```rust let params = build_map! { optional "album_type": album_type.map(|x| x.as_ref()), optional "market": market.map(|x| x.as_ref()), optional "limit": limit.as_deref(), optional "offset": offset.as_deref(), }; ``` ## Dependencies None ## 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 CI checks should pass ## Is this change properly documented? I think it's not necessary to add this to CHANGELOG Last but not least, Merry Christmas :-) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rspotify#379
No description provided.