Skip to content

Commit e699180

Browse files
committed
Fix clippy warning in read replica config validation
1 parent e31c896 commit e699180

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

quickwit/quickwit-config/src/node_config/serialize.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ fn validate(node_config: &NodeConfig) -> anyhow::Result<()> {
379379
/// [`QuickwitService::Metastore`], so the two cannot run on the same node, and the read-replica
380380
/// role requires `metastore_read_replica_uri` to connect to.
381381
fn validate_metastore_read_replica(node_config: &NodeConfig) -> anyhow::Result<()> {
382-
if let Some(uri) = &node_config.metastore_read_replica_uri {
383-
if !uri.protocol().is_database() {
384-
bail!("`metastore_read_replica_uri` must point to a PostgreSQL database, got `{uri}`");
385-
}
382+
if let Some(uri) = &node_config.metastore_read_replica_uri
383+
&& !uri.protocol().is_database()
384+
{
385+
bail!("`metastore_read_replica_uri` must point to a PostgreSQL database, got `{uri}`");
386386
}
387387

388388
let read_replica_enabled =

0 commit comments

Comments
 (0)