diff --git a/nexus/analyzer/src/lib.rs b/nexus/analyzer/src/lib.rs index 7e791860a..0372e87fd 100644 --- a/nexus/analyzer/src/lib.rs +++ b/nexus/analyzer/src/lib.rs @@ -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") @@ -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 @@ -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 @@ -800,7 +800,7 @@ fn parse_db_options( Ok(config) } -fn parse_metadata_db_info(conn_str: Option) -> anyhow::Result> { +fn parse_metadata_db_info(conn_str: Option<&str>) -> anyhow::Result> { let conn_str = match conn_str { Some(conn_str) => conn_str, None => return Ok(None),