cleanup of various clippy lints, bad practices and simplificaiton of some code
Signed-off-by: Jade <obsidianical@gmail.com>
This commit is contained in:
parent
fa67edc8c5
commit
528a7b6899
11 changed files with 34 additions and 45 deletions
|
@ -19,7 +19,7 @@ struct EditTemplate<'a> {
|
|||
|
||||
#[get("/edit/{id}")]
|
||||
pub async fn get_edit(data: web::Data<AppState>, id: web::Path<String>) -> HttpResponse {
|
||||
let mut pastas = data.pastas.lock().unwrap();
|
||||
let mut pastas = data.pastas.lock().await;
|
||||
|
||||
let id = if ARGS.hash_ids {
|
||||
hashid_to_u64(&id).unwrap_or(0)
|
||||
|
@ -65,7 +65,7 @@ pub async fn post_edit(
|
|||
to_u64(&id.into_inner()).unwrap_or(0)
|
||||
};
|
||||
|
||||
let mut pastas = data.pastas.lock().unwrap();
|
||||
let mut pastas = data.pastas.lock().await;
|
||||
|
||||
remove_expired(&mut pastas);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue