mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 09:48:44 +00:00
cleanup
This commit is contained in:
1 parent
030e84bc02
commit
a7bbf6a3b8
1 file changed
+6
-6
@@ -24,6 +24,9 @@ impl Display for ClientType {
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ClientError {
|
||||
/// A RouterClient was required but not provided on the draft context.
|
||||
RouterClientNotProvided,
|
||||
|
||||
/// The requested client is not configured on the RouterClient.
|
||||
ClientNotConfigured(ClientType),
|
||||
|
||||
@@ -57,9 +60,6 @@ pub enum ClientError {
|
||||
|
||||
/// A character token was not found in the provided character-token-to-id map
|
||||
CharacterTokenNotFoundInMap { token: CharacterToken },
|
||||
|
||||
/// A RouterClient was required but not provided on the draft context.
|
||||
RouterClientNotProvided,
|
||||
}
|
||||
|
||||
impl Error for ClientError {}
|
||||
@@ -67,6 +67,9 @@ impl Error for ClientError {}
|
||||
impl Display for ClientError {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::RouterClientNotProvided => {
|
||||
write!(f, "A RouterClient is required but was not provided on the draft context")
|
||||
}
|
||||
Self::ClientNotConfigured(client_type) => {
|
||||
write!(f, "{} client is not configured on the RouterClient", client_type)
|
||||
}
|
||||
@@ -100,9 +103,6 @@ impl Display for ClientError {
|
||||
Self::CharacterTokenNotFoundInMap { token } => {
|
||||
write!(f, "Character token '{}' was not found in the provided character-token-to-id map", token.as_str())
|
||||
}
|
||||
Self::RouterClientNotProvided => {
|
||||
write!(f, "A RouterClient is required but was not provided on the draft context")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user