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()
}
}
#[get("/attachment/<id>/<idx>")]
async fn attachment(
nm: &State<Notmuch>,
_nm: &State<Notmuch>,
id: &str,
idx: usize,
) -> Result<PartResponder, Debug<NotmuchError>> {
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<dyn Error>> {
show,
graphql_query,
graphql_request,
graphiql
graphiql,
attachment
],
)
.attach(cors)