diff --git a/crates/collab/src/main.rs b/crates/collab/src/main.rs index b3da6df4a8..5fea3699e9 100644 --- a/crates/collab/src/main.rs +++ b/crates/collab/src/main.rs @@ -24,7 +24,7 @@ pub struct AppState { } impl AppState { - async fn new(config: Config) -> Result> { + async fn new(config: &Config) -> Result> { let db = PostgresDb::new(&config.database_url, 5).await?; let this = Self { db: Arc::new(db), @@ -50,7 +50,7 @@ async fn main() -> Result<()> { } let config = envy::from_env::().expect("error loading config"); - let state = AppState::new(config).await?; + let state = AppState::new(&config).await?; let rpc = Peer::new(); run_server( state.clone(),