Skip to content

Commit

Permalink
Added debug assert to ensure the URL scheme is as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
westonpace committed Feb 27, 2024
1 parent c6c4995 commit 9a5a1a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rust/lancedb/src/remote/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ impl RestfulLanceDbClient {
host_override: Option<String>,
) -> Result<Self> {
let parsed_url = url::Url::parse(db_url)?;
debug_assert_eq!(parsed_url.scheme(), "db");
if !parsed_url.has_host() {
return Err(Error::Http {
message: format!("Invalid database URL (missing host) '{}'", db_url),
Expand Down

0 comments on commit 9a5a1a1

Please sign in to comment.