mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 09:49:31 +02:00
chore: rename internal error
This commit is contained in:
parent
955592c2f5
commit
b4e49aea04
2 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ pub(super) enum StateError {
|
||||||
#[error("the provided context has no tracks")]
|
#[error("the provided context has no tracks")]
|
||||||
ContextHasNoTracks,
|
ContextHasNoTracks,
|
||||||
#[error("playback of local files is not supported")]
|
#[error("playback of local files is not supported")]
|
||||||
UnsupportedLocalPlayBack,
|
UnsupportedLocalPlayback,
|
||||||
#[error("track uri <{0:?}> contains invalid characters")]
|
#[error("track uri <{0:?}> contains invalid characters")]
|
||||||
InvalidTrackUri(Option<String>),
|
InvalidTrackUri(Option<String>),
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ impl From<StateError> for Error {
|
||||||
| CanNotFindTrackInContext(_, _)
|
| CanNotFindTrackInContext(_, _)
|
||||||
| ContextHasNoTracks
|
| ContextHasNoTracks
|
||||||
| InvalidTrackUri(_) => Error::failed_precondition(err),
|
| InvalidTrackUri(_) => Error::failed_precondition(err),
|
||||||
CurrentlyDisallowed { .. } | UnsupportedLocalPlayBack => Error::unavailable(err),
|
CurrentlyDisallowed { .. } | UnsupportedLocalPlayback => Error::unavailable(err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,7 +194,7 @@ impl ConnectState {
|
||||||
error!("context didn't have any tracks: {context:#?}");
|
error!("context didn't have any tracks: {context:#?}");
|
||||||
Err(StateError::ContextHasNoTracks)?;
|
Err(StateError::ContextHasNoTracks)?;
|
||||||
} else if matches!(context.uri, Some(ref uri) if uri.starts_with(LOCAL_FILES_IDENTIFIER)) {
|
} 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();
|
let mut next_contexts = Vec::new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue