mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[PR #777] [MERGED] Various code improvements #1074
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#1074
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/777
Author: @roderickvd
Created: 5/28/2021
Status: ✅ Merged
Merged: 5/31/2021
Merged by: @roderickvd
Base:
dev← Head:various-code-improvements📝 Commits (10+)
b361800Remove deprecated use of std::u16::MAXe0c0736UseTryFromfor conversions that may fail89aaec7DRY up strings into constants712887eChangeas_ref().map()intoas_deref()10e8066Same forDeviceTypeandBitrate3df10fcDRY up durations and rates into constantsda1ededUseDurationinstead of time constants3d69237UseDurationfor time constants and functionseba06ffOptimizeVecwith response timesb4a5d21UseFromStrfor fallible&strconversions📊 Changes
27 files changed (+441 additions, -317 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
audio/src/fetch/mod.rs(+77 -75)📝
audio/src/fetch/receive.rs(+32 -38)📝
audio/src/lib.rs(+2 -2)📝
connect/src/spirc.rs(+1 -1)📝
core/src/channel.rs(+7 -2)📝
playback/src/audio_backend/alsa.rs(+8 -4)📝
playback/src/audio_backend/gstreamer.rs(+5 -1)📝
playback/src/audio_backend/jackaudio.rs(+5 -1)📝
playback/src/audio_backend/mod.rs(+11 -9)📝
playback/src/audio_backend/pipe.rs(+4 -0)📝
playback/src/audio_backend/portaudio.rs(+6 -2)📝
playback/src/audio_backend/pulseaudio.rs(+6 -2)📝
playback/src/audio_backend/rodio.rs(+8 -3)📝
playback/src/audio_backend/sdl.rs(+8 -3)📝
playback/src/audio_backend/subprocess.rs(+4 -0)📝
playback/src/config.rs(+10 -10)📝
playback/src/convert.rs(+13 -0)📝
playback/src/decoder/lewton_decoder.rs(+2 -1)📝
playback/src/decoder/passthrough_decoder.rs(+7 -2)...and 7 more files
📄 Description
This is a collection of code improvements:
std::u16::MAXconstantsFromStrfor fallible&strconversions everywhereas_ref().map()calls intoas_deref()Durationfor time constants and functions🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.