Skip to content

Commit

Permalink
style: fix clippy (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag authored Jul 10, 2024
1 parent 037b5cd commit 6e46e66
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/parser/promql.y
Original file line number Diff line number Diff line change
Expand Up @@ -587,20 +587,14 @@ fn update_optional_matching(
modifier: Option<BinModifier>,
matching: Option<LabelModifier>,
) -> Option<BinModifier> {
let modifier = match modifier {
Some(modifier) => modifier,
None => Default::default(),
};
let modifier = modifier.unwrap_or_default();
Some(modifier.with_matching(matching))
}

fn update_optional_card(
modifier: Option<BinModifier>,
card: VectorMatchCardinality,
) -> Option<BinModifier> {
let modifier = match modifier {
Some(modifier) => modifier,
None => Default::default(),
};
let modifier = modifier.unwrap_or_default();
Some(modifier.with_card(card))
}

0 comments on commit 6e46e66

Please sign in to comment.