Skip to content

Commit

Permalink
Make repo build on rust 1.64.0 (#3453)
Browse files Browse the repository at this point in the history
That amounts to removing let-else usage, confirmed by building locally
with 1.64.0.

This is temporary, due to an infrastructure issue with today's release.
  • Loading branch information
tomhoule committed Nov 29, 2022
1 parent 3eff12c commit 39190b2
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 39190b2

Please sign in to comment.