From 26d8aed5540677d539957dea16f95491499eff58 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 29 Nov 2024 12:36:59 +0100 Subject: Use Expo on the AppState This because since Rust 1.83 it is suggested to not use the static reference cloning --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 96cdc61..b9b7f87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,11 +31,11 @@ use tracing::Span; /// Create the app: setup everything and returns a `Router` async fn create_app() -> Result { logger::setup(); - expo::setup(CONFIG.expo_access_token.clone()); let dbclient = db::setup().await?; let state = state::AppState { client: Arc::new(dbclient), + expo: Arc::new(expo::setup(CONFIG.expo_access_token.clone())), }; let schema = Schema::build( -- cgit v1.2.3-18-g5258