mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
chore: remove useless Option type in plugins (#1544)
Co-authored-by: paomian <qtang@greptime.com>
This commit is contained in:
@@ -155,7 +155,8 @@ impl Instance {
|
||||
query_engine.clone(),
|
||||
dist_instance.clone(),
|
||||
));
|
||||
plugins.insert::<Option<StatementExecutorRef>>(Some(statement_executor.clone()));
|
||||
|
||||
plugins.insert::<StatementExecutorRef>(statement_executor.clone());
|
||||
|
||||
Ok(Instance {
|
||||
catalog_manager,
|
||||
|
||||
@@ -181,9 +181,8 @@ impl Services {
|
||||
http_server_builder.with_metrics_handler(MetricsHandler);
|
||||
http_server_builder.with_script_handler(instance.clone());
|
||||
|
||||
if let Some(configurator) = plugins.get::<Option<ConfiguratorRef>>() {
|
||||
http_server_builder.with_configurator(configurator);
|
||||
}
|
||||
http_server_builder.with_configurator(plugins.get::<ConfiguratorRef>());
|
||||
|
||||
let http_server = http_server_builder.build();
|
||||
result.push((Box::new(http_server), http_addr));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user