Skip to content

Commit

Permalink
fix: remove internal Arcs from context
Browse files Browse the repository at this point in the history
  • Loading branch information
sminez committed Nov 26, 2024
1 parent e780119 commit 620cbd9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/ratings_new/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ pub enum Error {
}

pub struct Context {
pub jwt_encoder: Arc<JwtEncoder>,
pub http_client: Arc<reqwest::Client>,
pub jwt_encoder: JwtEncoder,
pub http_client: reqwest::Client,
/// In progress category updates that we need to block on
pub category_updates: Arc<Mutex<HashMap<String, Arc<Notify>>>>,
pub category_updates: Mutex<HashMap<String, Arc<Notify>>>,
}

impl Context {
pub fn new(config: &Config) -> Result<Self, Error> {
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(),
})
}
Expand Down

0 comments on commit 620cbd9

Please sign in to comment.