refactor: remove redundant plugins argument (#1436)

This commit is contained in:
Ning Sun
2023-04-23 12:39:46 +08:00
committed by GitHub
parent 9f442dedf9
commit c5dba29f9e
3 changed files with 4 additions and 8 deletions

View File

@@ -121,7 +121,7 @@ impl StartCommand {
.context(error::StartFrontendSnafu)?;
instance
.build_servers(&opts, plugins)
.build_servers(&opts)
.await
.context(error::StartFrontendSnafu)?;

View File

@@ -223,7 +223,7 @@ impl StartCommand {
let mut frontend = build_frontend(plugins.clone(), datanode.get_instance()).await?;
frontend
.build_servers(&fe_opts, plugins)
.build_servers(&fe_opts)
.await
.context(StartFrontendSnafu)?;

View File

@@ -221,12 +221,8 @@ impl Instance {
})
}
pub async fn build_servers(
&mut self,
opts: &FrontendOptions,
plugins: Arc<Plugins>,
) -> Result<()> {
let servers = Services::build(opts, Arc::new(self.clone()), plugins).await?;
pub async fn build_servers(&mut self, opts: &FrontendOptions) -> Result<()> {
let servers = Services::build(opts, Arc::new(self.clone()), self.plugins.clone()).await?;
self.servers = Arc::new(servers);
Ok(())