[PR #250] [MERGED] Cleanup #341

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

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/250
Author: @marioortizmanero
Created: 9/6/2021
Status: Merged
Merged: 9/7/2021
Merged by: @marioortizmanero

Base: masterHead: cleanup


📝 Commits (10+)

📊 Changes

18 files changed (+407 additions, -385 deletions)

View changed files

📝 Cargo.toml (+13 -21)
📝 rspotify-http/Cargo.toml (+9 -14)
📝 rspotify-macros/Cargo.toml (+1 -1)
📝 rspotify-model/Cargo.toml (+5 -6)
📝 rspotify-model/src/album.rs (+9 -2)
📝 rspotify-model/src/audio.rs (+4 -1)
rspotify-model/src/auth.rs (+84 -0)
📝 rspotify-model/src/context.rs (+2 -1)
rspotify-model/src/custom_serde.rs (+224 -0)
📝 rspotify-model/src/error.rs (+15 -1)
📝 rspotify-model/src/lib.rs (+13 -199)
📝 rspotify-model/src/show.rs (+1 -1)
📝 rspotify-model/src/track.rs (+1 -1)
📝 src/client_creds.rs (+4 -4)
📝 src/clients/base.rs (+6 -5)
📝 src/clients/oauth.rs (+8 -9)
📝 src/lib.rs (+7 -118)
📝 tests/test_oauth2.rs (+1 -1)

📄 Description

Description

This cleans up quite a few things:

  • Removes unnecessary dependencies
  • Uses debug_assert instead of log to ensure endpoint predicates are met; some people don't enable logging at all
  • Clean up unnecessary derive macros.
  • Move all Serialize/Deserialize items from src to rspotify-model, like Token, where they fit better. This forced me to create a ModelError, but I don't really see the problem.
  • Move custom [de]serialization modules into custom_serde and fix pub(in crate) occurences
  • Token::from_cache now returns a Result instead of an Option, as the TODO above indicated.
  • Bumps all the dependencies

Motivation and Context

I'm working on the last things needed to finally release v0.11. This is one of them :)

I got some of these suggestions from this very nice article, give it a read yourself: https://matklad.github.io/2021/09/04/fast-rust-builds.html

Dependencies

None, if anything I've removed some.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The CI should also pass after this


🔄 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/250 **Author:** [@marioortizmanero](https://github.com/marioortizmanero) **Created:** 9/6/2021 **Status:** ✅ Merged **Merged:** 9/7/2021 **Merged by:** [@marioortizmanero](https://github.com/marioortizmanero) **Base:** `master` ← **Head:** `cleanup` --- ### 📝 Commits (10+) - [`bc1c7be`](https://github.com/ramsayleung/rspotify/commit/bc1c7be5c968e86f35da79e0e76da66b765ca044) Cleanup Cargo.toml - [`4489430`](https://github.com/ramsayleung/rspotify/commit/4489430703650d4183d59300fcb3558538e85bac) logging -> debug_assert - [`0e38d95`](https://github.com/ramsayleung/rspotify/commit/0e38d95a325ad87944b3403a8e2b5ef95e64cc42) More cargo cleanup - [`933f116`](https://github.com/ramsayleung/rspotify/commit/933f11614b27dfe0afdfd5e6c533e8036328993e) Formatting - [`6ca5fff`](https://github.com/ramsayleung/rspotify/commit/6ca5fff0c8c2f9480beed8890a1959d0c4b97650) No need for a fancy logger - [`466a9a9`](https://github.com/ramsayleung/rspotify/commit/466a9a9887d21d96f8afb2aa003909ad92379e3e) Clean up derives - [`da95750`](https://github.com/ramsayleung/rspotify/commit/da9575078a9e75f2a3cbe2a2e805049a042227f7) Lots of fixes & improvements - [`c337ae8`](https://github.com/ramsayleung/rspotify/commit/c337ae8e0080c6d1d5af8341c46b55e0ecf458a1) Upgraded all dependencies with `cargo upgrade` - [`bdfc9a7`](https://github.com/ramsayleung/rspotify/commit/bdfc9a7cacc7a30aad1a0d3c3d134376fc624267) Fix docs errors - [`1fb3492`](https://github.com/ramsayleung/rspotify/commit/1fb34924c8f6321a23dca7a2358b97c7c84a4e5e) Fix clippy errors ### 📊 Changes **18 files changed** (+407 additions, -385 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.toml` (+13 -21) 📝 `rspotify-http/Cargo.toml` (+9 -14) 📝 `rspotify-macros/Cargo.toml` (+1 -1) 📝 `rspotify-model/Cargo.toml` (+5 -6) 📝 `rspotify-model/src/album.rs` (+9 -2) 📝 `rspotify-model/src/audio.rs` (+4 -1) ➕ `rspotify-model/src/auth.rs` (+84 -0) 📝 `rspotify-model/src/context.rs` (+2 -1) ➕ `rspotify-model/src/custom_serde.rs` (+224 -0) 📝 `rspotify-model/src/error.rs` (+15 -1) 📝 `rspotify-model/src/lib.rs` (+13 -199) 📝 `rspotify-model/src/show.rs` (+1 -1) 📝 `rspotify-model/src/track.rs` (+1 -1) 📝 `src/client_creds.rs` (+4 -4) 📝 `src/clients/base.rs` (+6 -5) 📝 `src/clients/oauth.rs` (+8 -9) 📝 `src/lib.rs` (+7 -118) 📝 `tests/test_oauth2.rs` (+1 -1) </details> ### 📄 Description ## Description This cleans up quite a few things: * Removes unnecessary dependencies * Uses `debug_assert` instead of `log` to ensure endpoint predicates are met; some people don't enable logging at all * Clean up unnecessary `derive` macros. * Move all `Serialize/Deserialize` items from `src` to `rspotify-model`, like `Token`, where they fit better. This forced me to create a `ModelError`, but I don't really see the problem. * Move custom [de]serialization modules into `custom_serde` and fix `pub(in crate)` occurences * `Token::from_cache` now returns a `Result` instead of an `Option`, as the TODO above indicated. * Bumps all the dependencies ## Motivation and Context I'm working on the last things needed to finally release v0.11. This is one of them :) I got some of these suggestions from this very nice article, give it a read yourself: https://matklad.github.io/2021/09/04/fast-rust-builds.html ## Dependencies None, if anything I've removed some. ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? The CI should also pass after this --- <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:20 +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#341
No description provided.