Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra committed Mar 1, 2024
1 parent fe440f4 commit 163f751
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/rattler_conda_types/src/version_spec/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,11 @@ fn regex_constraint_parser(input: &str) -> IResult<&str, Constraint, ParseConstr
let (_rest, (preceder, _, terminator)) =
tuple((opt(char('^')), take_while(|c| c != '$'), opt(char('$'))))(input)?;
match (preceder, terminator) {
(None, None) => Err(nom::Err::Error(
ParseConstraintError::UnterminatedRegex,
(None, None) => Err(nom::Err::Error(ParseConstraintError::UnterminatedRegex)),
(_, None) | (None, _) => Err(nom::Err::Failure(ParseConstraintError::UnterminatedRegex)),
_ => Err(nom::Err::Failure(
ParseConstraintError::RegexConstraintsNotSupported,
)),
(_, None)|(None, _) => Err(nom::Err::Failure(
ParseConstraintError::UnterminatedRegex,
)),
_ => Err(nom::Err::Failure(ParseConstraintError::RegexConstraintsNotSupported))
}
}

Expand Down

0 comments on commit 163f751

Please sign in to comment.