Remove single parse_action, move into parse_actions
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-01-09 18:17:04 +01:00
parent 1c3865d8dd
commit bb08011d6f
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -146,16 +146,14 @@ fn parse_receive(i: &str) -> IResult<&str, Action> {
Ok((i, Action::Receive(name, elem)))
}
fn parse_action(i: &str) -> IResult<&str, Action> {
delimited(
allspaces,
alt((parse_connect, parse_send, parse_receive)),
allspaces,
)(i)
}
fn parse_actions(i: &str) -> IResult<&str, Vec<Action>> {
let (i, actions) = many1(parse_action)(i)?;
let (i, actions) = many1(
delimited(
allspaces,
alt((parse_connect, parse_send, parse_receive)),
allspaces,
)
)(i)?;
Ok((i, actions))
}