mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[PR #652] [MERGED] clean up imports & clippy lints #1000
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#1000
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/librespot-org/librespot/pull/652
Author: @leshow
Created: 2/25/2021
Status: ✅ Merged
Merged: 3/9/2021
Merged by: @ashthespy
Base:
tokio_migration← Head:cleanup📝 Commits (2)
6a33eb4minor cleanup3388508use current_thread📊 Changes
27 files changed (+167 additions, -207 deletions)
View changed files
📝
audio/src/fetch.rs(+23 -36)📝
audio/src/lewton_decoder.rs(+5 -5)📝
audio/src/lib.rs(+3 -3)📝
audio/src/passthrough_decoder.rs(+7 -7)📝
audio/src/range_set.rs(+10 -13)📝
connect/src/discovery.rs(+10 -13)📝
core/src/apresolve.rs(+2 -2)📝
core/src/authentication.rs(+4 -4)📝
core/src/channel.rs(+3 -3)📝
core/src/diffie_hellman.rs(+2 -2)📝
core/src/mercury/mod.rs(+21 -23)📝
core/src/mercury/sender.rs(+2 -2)📝
core/src/session.rs(+2 -7)📝
core/src/spotify_id.rs(+4 -4)📝
core/tests/connect.rs(+30 -29)📝
metadata/src/lib.rs(+1 -1)📝
playback/src/audio_backend/gstreamer.rs(+3 -5)📝
playback/src/audio_backend/jackaudio.rs(+1 -1)📝
playback/src/audio_backend/mod.rs(+1 -1)📝
playback/src/audio_backend/pulseaudio.rs(+2 -2)...and 7 more files
📄 Description
I based this off the
tokio_migrationbranch since that seems to be the most up to date. When I familiarize myself with a codebase I often go through and clean up little things. I cleaned up:StreamLoaderControllerin audio had methods which didn't need to be&mut selfanymoreThere should be no real code changes here, it's all just cleanups.
There's more I'd like to do but this is already big enough for a PR. I'd like to start removing the
unwrapandexpects in the code. The common practice these days is to use a boxed error type for binary, andErrorderive (likethiserror) on library code. Given that, I think we should consideranyhowfor the binary, we can replaceunwrap/expectwith.contextand use?.Now that the code is written in async/await format, there looks to be a lot more we could potentially simplify. Anyway, let me know what you think for now! Thanks!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.