1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 01:39:28 +02:00

chore: rename internal error

This commit is contained in:
Felix Prillwitz 2025-08-29 21:40:20 +02:00
parent 955592c2f5
commit b4e49aea04
No known key found for this signature in database
GPG key ID: DE334B43606D1455
2 changed files with 3 additions and 3 deletions

View file

@ -55,7 +55,7 @@ pub(super) enum StateError {
#[error("the provided context has no tracks")]
ContextHasNoTracks,
#[error("playback of local files is not supported")]
UnsupportedLocalPlayBack,
UnsupportedLocalPlayback,
#[error("track uri <{0:?}> contains invalid characters")]
InvalidTrackUri(Option<String>),
}
@ -69,7 +69,7 @@ impl From<StateError> for Error {
| CanNotFindTrackInContext(_, _)
| ContextHasNoTracks
| InvalidTrackUri(_) => Error::failed_precondition(err),
CurrentlyDisallowed { .. } | UnsupportedLocalPlayBack => Error::unavailable(err),
CurrentlyDisallowed { .. } | UnsupportedLocalPlayback => Error::unavailable(err),
}
}
}

View file

@ -194,7 +194,7 @@ impl ConnectState {
error!("context didn't have any tracks: {context:#?}");
Err(StateError::ContextHasNoTracks)?;
} else if matches!(context.uri, Some(ref uri) if uri.starts_with(LOCAL_FILES_IDENTIFIER)) {
Err(StateError::UnsupportedLocalPlayBack)?;
Err(StateError::UnsupportedLocalPlayback)?;
}
let mut next_contexts = Vec::new();