server: address lint

This commit is contained in:
Bill Thiede 2023-12-05 11:26:23 -08:00
parent dd1a8c2eae
commit 7a6000be26

View File

@ -89,13 +89,15 @@ impl<'r, 'o: 'r> Responder<'r, 'o> for PartResponder {
.ok() .ok()
} }
} }
#[get("/attachment/<id>/<idx>")] #[get("/attachment/<id>/<idx>")]
async fn attachment( async fn attachment(
nm: &State<Notmuch>, _nm: &State<Notmuch>,
id: &str, id: &str,
idx: usize, idx: usize,
) -> Result<PartResponder, Debug<NotmuchError>> { ) -> Result<PartResponder, Debug<NotmuchError>> {
let mid = if id.starts_with("id:") { let _idx = idx;
let _mid = if id.starts_with("id:") {
id.to_string() id.to_string()
} else { } else {
format!("id:{}", id) format!("id:{}", id)
@ -198,7 +200,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
show, show,
graphql_query, graphql_query,
graphql_request, graphql_request,
graphiql graphiql,
attachment
], ],
) )
.attach(cors) .attach(cors)