mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-11-25 16:46:35 +01:00
Use if let instead of a match with empty block.
This commit is contained in:
parent
84bcac0112
commit
bf623eed7f
2 changed files with 4 additions and 6 deletions
|
@ -999,9 +999,8 @@ async fn save_attachment(
|
||||||
attachment.save(&conn).await.expect("Error saving attachment");
|
attachment.save(&conn).await.expect("Error saving attachment");
|
||||||
}
|
}
|
||||||
|
|
||||||
match data.data.persist_to(&file_path).await {
|
if let Err(_err) = data.data.persist_to(&file_path).await {
|
||||||
Ok(_result) => {}
|
data.data.move_copy_to(file_path).await?
|
||||||
Err(_error) => data.data.move_copy_to(&file_path).await?,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nt.send_cipher_update(UpdateType::CipherUpdate, &cipher, &cipher.update_users_revision(&conn).await).await;
|
nt.send_cipher_update(UpdateType::CipherUpdate, &cipher, &cipher.update_users_revision(&conn).await).await;
|
||||||
|
|
|
@ -226,9 +226,8 @@ async fn post_send_file(data: Form<UploadData<'_>>, headers: Headers, conn: DbCo
|
||||||
let file_path = folder_path.join(&file_id);
|
let file_path = folder_path.join(&file_id);
|
||||||
tokio::fs::create_dir_all(&folder_path).await?;
|
tokio::fs::create_dir_all(&folder_path).await?;
|
||||||
|
|
||||||
match data.persist_to(&file_path).await {
|
if let Err(_err) = data.persist_to(&file_path).await {
|
||||||
Ok(_result) => {}
|
data.move_copy_to(file_path).await?
|
||||||
Err(_error) => data.move_copy_to(&file_path).await?,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut data_value: Value = serde_json::from_str(&send.data)?;
|
let mut data_value: Value = serde_json::from_str(&send.data)?;
|
||||||
|
|
Loading…
Reference in a new issue