X-Git-Url: http://git.euphorik.ch/?p=recipes.git;a=blobdiff_plain;f=backend%2Fsrc%2Fdata%2Fasynchronous.rs;fp=backend%2Fsrc%2Fdata%2Fasynchronous.rs;h=5d273886e8164195b6a83f3f573e48a49ac48a8a;hp=7ef77b8c2bc853b199f2fa199f68e22bd532f84e;hb=cc2e5b6893b582b4b5c4e7a93e914a189f6a959b;hpb=adcf4a5a5d982489a7e91d4988401eb4512839a3 diff --git a/backend/src/data/asynchronous.rs b/backend/src/data/asynchronous.rs index 7ef77b8..5d27388 100644 --- a/backend/src/data/asynchronous.rs +++ b/backend/src/data/asynchronous.rs @@ -7,7 +7,6 @@ use chrono::{prelude::*, Duration}; use super::db::*; use crate::model; -use crate::user::User; #[derive(Debug)] pub enum DBAsyncError { @@ -65,7 +64,7 @@ impl Connection { ) } - pub async fn load_user_async(&self, user_id: i64) -> Result { + pub async fn load_user_async(&self, user_id: i64) -> Result { let self_copy = self.clone(); combine_errors( web::block(move || self_copy.load_user(user_id).map_err(DBAsyncError::from)).await,