Skip to content

Commit

Permalink
take ref
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Jan 4, 2024
1 parent dc02850 commit 188fc76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nexus/analyzer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ fn parse_db_options(
Some(config)
}
DbType::Eventhub => {
let conn_str = opts.get("metadata_db").map(|s| s.to_string());
let conn_str = opts.get("metadata_db");
let metadata_db = parse_metadata_db_info(conn_str)?;
let subscription_id = opts
.get("subscription_id")
Expand Down Expand Up @@ -708,7 +708,7 @@ fn parse_db_options(
Some(config)
}
DbType::S3 => {
let s3_conn_str = opts.get("metadata_db").map(|s| s.to_string());
let s3_conn_str = opts.get("metadata_db");
let metadata_db = parse_metadata_db_info(s3_conn_str)?;
let s3_config = S3Config {
url: opts
Expand Down Expand Up @@ -748,7 +748,7 @@ fn parse_db_options(
Some(config)
}
DbType::EventhubGroup => {
let conn_str = opts.get("metadata_db").map(|s| s.to_string());
let conn_str = opts.get("metadata_db");
let metadata_db = parse_metadata_db_info(conn_str)?;

// metadata_db is required for eventhub group
Expand Down Expand Up @@ -800,7 +800,7 @@ fn parse_db_options(
Ok(config)
}

fn parse_metadata_db_info(conn_str: Option<String>) -> anyhow::Result<Option<PostgresConfig>> {
fn parse_metadata_db_info(conn_str: Option<&str>) -> anyhow::Result<Option<PostgresConfig>> {
let conn_str = match conn_str {
Some(conn_str) => conn_str,
None => return Ok(None),
Expand Down

0 comments on commit 188fc76

Please sign in to comment.