diff options
Diffstat (limited to 'util/src/micropub.rs')
-rw-r--r-- | util/src/micropub.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/util/src/micropub.rs b/util/src/micropub.rs index 9d2c525..1f8008b 100644 --- a/util/src/micropub.rs +++ b/util/src/micropub.rs @@ -21,7 +21,7 @@ pub enum QueryType { Category, /// Unsupported query type // TODO: make this take a lifetime parameter for zero-copy deserialization if possible? - Unknown(std::borrow::Cow<'static, str>) + Unknown(std::borrow::Cow<'static, str>), } /// Data structure representing a Micropub channel in the ?q=channels output. @@ -42,7 +42,7 @@ pub struct SyndicationDestination { /// The syndication destination's UID, opaque to the client. pub uid: String, /// A human-friendly name. - pub name: String + pub name: String, } fn default_q_list() -> Vec<QueryType> { @@ -67,7 +67,7 @@ pub struct Config { pub media_endpoint: Option<url::Url>, /// Other unspecified keys, sometimes implementation-defined. #[serde(flatten)] - pub other: HashMap<String, serde_json::Value> + pub other: HashMap<String, serde_json::Value>, } #[derive(Serialize, Deserialize, PartialEq, Eq, Debug)] @@ -145,14 +145,17 @@ impl Error { pub const fn from_static(error: ErrorKind, error_description: &'static str) -> Self { Self { error, - error_description: Some(std::borrow::Cow::Borrowed(error_description)) + error_description: Some(std::borrow::Cow::Borrowed(error_description)), } } } impl From<ErrorKind> for Error { fn from(error: ErrorKind) -> Self { - Self { error, error_description: None } + Self { + error, + error_description: None, + } } } @@ -190,4 +193,3 @@ impl axum_core::response::IntoResponse for Error { )) } } - |