From 7a6000be2647dbb0d14958c0094dd268aecfe850 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Tue, 5 Dec 2023 11:26:23 -0800 Subject: [PATCH] server: address lint --- server/src/bin/server.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/src/bin/server.rs b/server/src/bin/server.rs index e1bec9b..a070d67 100644 --- a/server/src/bin/server.rs +++ b/server/src/bin/server.rs @@ -89,13 +89,15 @@ impl<'r, 'o: 'r> Responder<'r, 'o> for PartResponder { .ok() } } + #[get("/attachment//")] async fn attachment( - nm: &State, + _nm: &State, id: &str, idx: usize, ) -> Result> { - let mid = if id.starts_with("id:") { + let _idx = idx; + let _mid = if id.starts_with("id:") { id.to_string() } else { format!("id:{}", id) @@ -198,7 +200,8 @@ async fn main() -> Result<(), Box> { show, graphql_query, graphql_request, - graphiql + graphiql, + attachment ], ) .attach(cors)