Skip to content

Commit

Permalink
remove needless clone
Browse files Browse the repository at this point in the history
  • Loading branch information
pranayat committed May 1, 2024
1 parent b6c5e5d commit 22344d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions psl/psl-core/src/validate/datasource_loader.rs
Expand Up @@ -163,8 +163,8 @@ fn lift_datasource(
None => (None, None),
};

if let Some((shadow_url, _)) = shadow_database_url.clone() {
if let (Some(direct_url), Some(direct_url_span)) = (direct_url.clone(), direct_url_span) {
if let Some((shadow_url, _)) = &shadow_database_url {
if let (Some(direct_url), Some(direct_url_span)) = (&direct_url, direct_url_span) {
if shadow_url == direct_url {
diagnostics.push_error(DatamodelError::new_shadow_database_is_same_as_direct_url_error(
source_name,
Expand All @@ -173,7 +173,7 @@ fn lift_datasource(
}
}

if shadow_url == url {
if shadow_url == &url {
diagnostics.push_error(DatamodelError::new_shadow_database_is_same_as_main_url_error(
source_name,
url_span,
Expand Down

0 comments on commit 22344d2

Please sign in to comment.