diff options
author | Vika <vika@fireburn.ru> | 2021-05-17 18:44:59 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2021-05-17 18:44:59 +0300 |
commit | 9a2791d745f4a9f0307eb69b50de5629f51564cc (patch) | |
tree | 4c20804b1112e5302b4eae7be54de98c13e72759 /src/micropub/get.rs | |
parent | 9c3ede5d1ec339a59d5f8274d8043928cafb5a44 (diff) | |
download | kittybox-9a2791d745f4a9f0307eb69b50de5629f51564cc.tar.zst |
Make rustfmt happy
Diffstat (limited to 'src/micropub/get.rs')
-rw-r--r-- | src/micropub/get.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/micropub/get.rs b/src/micropub/get.rs index e106883..525bf12 100644 --- a/src/micropub/get.rs +++ b/src/micropub/get.rs @@ -1,23 +1,26 @@ -use tide::prelude::{Deserialize, json}; -use tide::{Request, Response, Result}; -use crate::ApplicationState; -use crate::database::{MicropubChannel,Storage}; +use crate::database::{MicropubChannel, Storage}; use crate::indieauth::User; +use crate::ApplicationState; +use tide::prelude::{json, Deserialize}; +use tide::{Request, Response, Result}; #[derive(Deserialize)] struct QueryOptions { q: String, - url: Option<String> + url: Option<String>, } pub async fn get_handler<Backend>(req: Request<ApplicationState<Backend>>) -> Result where - Backend: Storage + Send + Sync + Backend: Storage + Send + Sync, { let user = req.ext::<User>().unwrap(); let backend = &req.state().storage; let media_endpoint = &req.state().media_endpoint; - let query = req.query::<QueryOptions>().unwrap_or(QueryOptions { q: "".to_string(), url: None }); + let query = req.query::<QueryOptions>().unwrap_or(QueryOptions { + q: "".to_string(), + url: None, + }); match &*query.q { "config" => { let channels: Vec<MicropubChannel>; |