Consolidate server's rpc state into the rpc::Server struct

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-08-19 12:17:52 -07:00
co-authored by Nathan Sobo
parent 266867b516
commit 3631fbd874
4 changed files with 569 additions and 609 deletions
+1 -3
View File
@@ -14,7 +14,7 @@ mod tests;
use self::errors::TideResultExt as _;
use anyhow::{Context, Result};
use async_std::{net::TcpListener, sync::RwLock as AsyncRwLock};
use async_std::net::TcpListener;
use async_trait::async_trait;
use auth::RequestExt as _;
use db::{Db, DbOptions};
@@ -51,7 +51,6 @@ pub struct AppState {
auth_client: auth::Client,
github_client: Arc<github::AppClient>,
repo_client: github::RepoClient,
rpc: AsyncRwLock<rpc::State>,
config: Config,
}
@@ -76,7 +75,6 @@ impl AppState {
auth_client: auth::build_client(&config.github_client_id, &config.github_client_secret),
github_client,
repo_client,
rpc: Default::default(),
config,
};
this.register_partials();