Skip to content

Commit 8c1b630

Browse files
committed
rustfmt
1 parent a936bda commit 8c1b630

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

src/error.rs

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,30 @@ impl std::error::Error for Error {
4444
impl std::fmt::Display for Error {
4545
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4646
match self {
47-
Error::AuthenticationError => write!(f, "Wrong api key or your account is suspended."),
48-
Error::ApiConnectionError => write!(f, "Fail to connect to API servers."),
49-
Error::InvalidRequestError => write!(f, "Something wrong on your end (client side errors), e.g., missing required parameters."),
50-
Error::RateLimitError => write!(f, "You are using FREE plan and you exceed the quota limit."),
51-
Error::NotFoundError => write!(f, "Endpoint not exist, or podcast / episode not exist."),
52-
Error::ListenApiError => write!(f, "Something wrong on our end (unexpected server errors)."),
53-
Error::Reqwest(_) | Error::Json(_) => write!(f, "{}", self)
47+
Error::AuthenticationError => {
48+
write!(f, "Wrong api key or your account is suspended.")
49+
}
50+
Error::ApiConnectionError => {
51+
write!(f, "Fail to connect to API servers.")
52+
}
53+
Error::InvalidRequestError => {
54+
write!(
55+
f,
56+
"Something wrong on your end (client side errors), e.g., missing required parameters."
57+
)
58+
}
59+
Error::RateLimitError => {
60+
write!(f, "You are using FREE plan and you exceed the quota limit.")
61+
}
62+
Error::NotFoundError => {
63+
write!(f, "Endpoint not exist, or podcast / episode not exist.")
64+
}
65+
Error::ListenApiError => {
66+
write!(f, "Something wrong on our end (unexpected server errors).")
67+
}
68+
Error::Reqwest(_) | Error::Json(_) => {
69+
write!(f, "{}", self)
70+
}
5471
}
5572
}
5673
}

0 commit comments

Comments
 (0)