Remove single parse_action, move into parse_actions
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
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:
parent
1c3865d8dd
commit
bb08011d6f
1 changed files with 7 additions and 9 deletions
16
src/lib.rs
16
src/lib.rs
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue