mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #661] Trait Errors #385
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#385
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?
Originally created by @Stateford on GitHub (Mar 2, 2021).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/661
Originally assigned to: @Stateford on GitHub.
Hello, I was trying to run the example from play and I tried to use the shorthand for error checking. I did get this error when trying to use it.
Is there any chance that these errors could inherit the Error trait? I don't mind taking a look at making the change myself.
@Johannesd3 commented on GitHub (Mar 2, 2021):
NoneErrordoes not belong to us, it's from the standard library.SpotifyIdErrorwould of course be possible, and there is certainly room for improvement in error handling.But for now it's simpler if you use
Option::ok_or,Option::ok_or_elseandResult::map_err, or a separate error handling crate likeanyhow.@Stateford commented on GitHub (Mar 4, 2021):
Yea, so the NoneError makes sense, however it would be a good idea to add it to SpotifyIdError. I'll look at how hard it would be to add.
@roderickvd commented on GitHub (May 25, 2021):
@Stateford I took the liberty to assign this one to you, as you offered to look into it.
@Stateford commented on GitHub (May 26, 2021):
@roderickvd sure, I don't mind taking a look when I get a chance.
@Johannesd3 commented on GitHub (May 26, 2021):
We switched to
thiserrorrecently, which makes it an easy addition.@roderickvd commented on GitHub (Aug 7, 2021):
@Stateford is this still something you would like to pursue?
@roderickvd commented on GitHub (Jan 12, 2022):
Fixed in
new-api@github.com/librespot-org/librespot@62461be1fc.