From 620cbd92d77015183c579ccc32644bede64c3922 Mon Sep 17 00:00:00 2001 From: Innes Anderson-Morrison Date: Wed, 20 Nov 2024 13:29:16 +0000 Subject: [PATCH] fix: remove internal Arcs from context --- crates/ratings_new/src/context.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/ratings_new/src/context.rs b/crates/ratings_new/src/context.rs index a4f1b575..2861ca5e 100644 --- a/crates/ratings_new/src/context.rs +++ b/crates/ratings_new/src/context.rs @@ -22,17 +22,17 @@ pub enum Error { } pub struct Context { - pub jwt_encoder: Arc, - pub http_client: Arc, + pub jwt_encoder: JwtEncoder, + pub http_client: reqwest::Client, /// In progress category updates that we need to block on - pub category_updates: Arc>>>, + pub category_updates: Mutex>>, } impl Context { pub fn new(config: &Config) -> Result { Ok(Self { - jwt_encoder: Arc::new(JwtEncoder::from_secret(&config.jwt_secret)?), - http_client: Arc::new(reqwest::Client::new()), + jwt_encoder: JwtEncoder::from_secret(&config.jwt_secret)?, + http_client: reqwest::Client::new(), category_updates: Default::default(), }) }