Skip to content

Commit

Permalink
Fix clippy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nag763 committed Dec 1, 2024
1 parent ac3739b commit 6f9f2ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doteur_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,10 @@ fn generate_relations(
.map_or("RESTRICT", |m| m.as_str());

// Process the input
return match detect_comas(table_key.as_str()) {
match detect_comas(table_key.as_str()) {
// Case where attributes are separated by comas
Ok(comas_vec) if !comas_vec.is_empty() => {
return match detect_comas(distant_key.as_str()) {
match detect_comas(distant_key.as_str()) {
// If both vec are the same size, then the nth key of vec1 matches nth key of vec2
Ok(second_coma_vec)
if !second_coma_vec.is_empty() && second_coma_vec.len() == comas_vec.len() =>
Expand Down Expand Up @@ -461,7 +461,7 @@ fn generate_relations(
_ => Err(DoteurCoreError::user_input_malformed(
"Error in file format",
)),
};
}
}
// Single key processing
_ => Ok(Some(Relation::new_with_single_pair(
Expand All @@ -471,7 +471,7 @@ fn generate_relations(
distant_key.replace_enclosing().trim_leading_trailing(),
relation_type.to_string(),
))),
};
}
}

/// Process the given file and return the output as a string
Expand Down

0 comments on commit 6f9f2ba

Please sign in to comment.