From 3938f7c364ff0c9bf416da3a25c39116e7f6b00f Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 25 Apr 2022 20:12:32 -0600 Subject: [PATCH] Fix compile error --- crates/collab/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/collab/src/main.rs b/crates/collab/src/main.rs index b3da6df4a8a569cbe28670779e8e3ae6cda8e294..5fea3699e9d6b73952e50e642dc93dc8308cbf39 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(),