Skip to content

Commit

Permalink
refactor: enhance clarity of `Arc::clone
Browse files Browse the repository at this point in the history
By employing `Arc::clone()` for reference counting,
we can visually distinguish between deep-copy clones and
those that simply increment the reference count.
  • Loading branch information
azzamsa committed Feb 6, 2024
1 parent a2a082c commit 29c36b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub async fn app() -> Result<Router, Error> {
db::migrate(&db).await?;

let health_service = Arc::new(health::Service::new());
let meta_service = Arc::new(meta::Service::new(config.clone()));
let meta_service = Arc::new(meta::Service::new(Arc::clone(&config)));
let mailer_service = Mailer::new();
let user_service = Arc::new(user::Service::new(db.clone(), mailer_service));

Expand Down

0 comments on commit 29c36b1

Please sign in to comment.