Update to diesel2

This commit is contained in:
Daniel García committed 2022-10-23 00:49:23 +02:00
1 parent b878495d64
commit 8409b31d6b
36 files changed
+1267 -1270

No files matched your search

+4 -4
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;