1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-05-25 04:53:58 +00:00

Update to diesel2

This commit is contained in:
Daniel García 2022-05-20 23:39:47 +02:00
parent b878495d64
commit 8409b31d6b
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
36 changed files with 1267 additions and 1270 deletions

View file

@ -621,9 +621,9 @@ fn _process_key(key: &str) -> String {
// Retry methods
//
pub fn retry<F, T, E>(func: F, max_tries: u32) -> Result<T, E>
pub fn retry<F, T, E>(mut func: F, max_tries: u32) -> Result<T, E>
where
F: Fn() -> Result<T, E>,
F: FnMut() -> Result<T, E>,
{
let mut tries = 0;
@ -642,9 +642,9 @@ where
}
}
pub async fn retry_db<F, T, E>(func: F, max_tries: u32) -> Result<T, E>
pub async fn retry_db<F, T, E>(mut func: F, max_tries: u32) -> Result<T, E>
where
F: Fn() -> Result<T, E>,
F: FnMut() -> Result<T, E>,
E: std::error::Error,
{
let mut tries = 0;