aboutsummaryrefslogtreecommitdiffstats
path: root/crates/rocie-client/src/apis/mod.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-03-19 05:41:14 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-03-19 05:41:14 +0100
commitca5c852c5091d7923cc5b1dabf1af5581c459fd1 (patch)
tree105a78beb6ca6074d49e1c0cdc066883518d7ea1 /crates/rocie-client/src/apis/mod.rs
parentchore(LICENSES/GPL-3.0-or-later): Add (diff)
downloadserver-ca5c852c5091d7923cc5b1dabf1af5581c459fd1.zip
chore(rocie-{server,client}): Format code
Diffstat (limited to '')
-rw-r--r--crates/rocie-client/src/apis/mod.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/crates/rocie-client/src/apis/mod.rs b/crates/rocie-client/src/apis/mod.rs
index 5d2ccaf..c9d6e65 100644
--- a/crates/rocie-client/src/apis/mod.rs
+++ b/crates/rocie-client/src/apis/mod.rs
@@ -26,7 +26,7 @@ pub enum Error<T> {
ResponseError(ResponseContent<T>),
}
-impl <T> fmt::Display for Error<T> {
+impl<T> fmt::Display for Error<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let (module, e) = match self {
Error::Reqwest(e) => ("reqwest", e.to_string()),
@@ -38,7 +38,7 @@ impl <T> fmt::Display for Error<T> {
}
}
-impl <T: fmt::Debug> error::Error for Error<T> {
+impl<T: fmt::Debug> error::Error for Error<T> {
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
Some(match self {
Error::Reqwest(e) => e,
@@ -49,19 +49,19 @@ impl <T: fmt::Debug> error::Error for Error<T> {
}
}
-impl <T> From<reqwest::Error> for Error<T> {
+impl<T> From<reqwest::Error> for Error<T> {
fn from(e: reqwest::Error) -> Self {
Error::Reqwest(e)
}
}
-impl <T> From<serde_json::Error> for Error<T> {
+impl<T> From<serde_json::Error> for Error<T> {
fn from(e: serde_json::Error) -> Self {
Error::Serde(e)
}
}
-impl <T> From<std::io::Error> for Error<T> {
+impl<T> From<std::io::Error> for Error<T> {
fn from(e: std::io::Error) -> Self {
Error::Io(e)
}
@@ -88,8 +88,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String
value,
));
}
- },
- serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())),
+ }
+ serde_json::Value::String(s) => {
+ params.push((format!("{}[{}]", prefix, key), s.clone()))
+ }
_ => params.push((format!("{}[{}]", prefix, key), value.to_string())),
}
}
@@ -106,7 +108,7 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String
enum ContentType {
Json,
Text,
- Unsupported(String)
+ Unsupported(String),
}
impl From<&str> for ContentType {