Skip to content

Commit

Permalink
Revert "Revert "Make repo build on rust 1.64.0 (#3453)" (#3454)" (#3488)
Browse files Browse the repository at this point in the history
This reverts commit 53fa4e6.
  • Loading branch information
tomhoule authored Dec 12, 2022
1 parent df38557 commit ddfde0a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions prisma-fmt/src/code_actions/relations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ pub(super) fn add_index_for_relation_fields(
schema: &str,
relation: RelationFieldWalker<'_>,
) {
let Some(fields) = relation.fields() else { return; };
let fields = match relation.fields() {
Some(fields) => fields,
None => return,
};
if relation.model().indexes().any(|index| {
index
.fields()
Expand All @@ -267,11 +270,14 @@ pub(super) fn add_index_for_relation_fields(
..Default::default()
};

let Some(span_diagnostics) = super::diagnostics_for_span(
let span_diagnostics = match super::diagnostics_for_span(
schema,
&params.context.diagnostics,
relation.relation_attribute().unwrap().span(),
) else { return; };
) {
Some(sd) => sd,
None => return,
};

let diagnostics = span_diagnostics
.into_iter()
Expand Down

0 comments on commit ddfde0a

Please sign in to comment.