Skip to content

Commit

Permalink
refactor: avoid pattern matching twice
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Jun 19, 2024
1 parent 1ea42d6 commit d9e06f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions malva/src/doc_gen/sass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ impl<'s> DocGen<'s> for SassEach<'s> {
.append(Doc::text("in"))
.append(helpers::format_operator_suffix_space(ctx))
.concat(ctx.end_spaced_comments(self.in_span.end, self.expr.span().start))
.append(if matches!(self.expr, ComponentValue::SassList(..)) {
self.expr.doc(ctx)
.append(if let ComponentValue::SassList(sass_list) = &self.expr {
sass_list.doc(ctx)
} else {
self.expr.doc(ctx).nest(ctx.indent_width)
})
Expand Down

0 comments on commit d9e06f4

Please sign in to comment.