Fix failure on commands ending on whitespace #75
|
@ -343,7 +343,6 @@ fn pwm(input: &[u8]) -> IResult<&[u8], Result<Command, Error>> {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
))(input)?;
|
))(input)?;
|
||||||
end(input)?;
|
|
||||||
Ok((input, result))
|
Ok((input, result))
|
||||||
},
|
},
|
||||||
value(Ok(Command::Show(ShowCommand::Pwm)), end)
|
value(Ok(Command::Show(ShowCommand::Pwm)), end)
|
||||||
|
@ -362,7 +361,6 @@ fn center_point(input: &[u8]) -> IResult<&[u8], Result<Command, Error>> {
|
||||||
Ok((input, value.map(|value| CenterPoint::Override(value as f32))))
|
Ok((input, value.map(|value| CenterPoint::Override(value as f32))))
|
||||||
}
|
}
|
||||||
))(input)?;
|
))(input)?;
|
||||||
end(input)?;
|
|
||||||
Ok((input, center.map(|center| Command::CenterPoint {
|
Ok((input, center.map(|center| Command::CenterPoint {
|
||||||
channel,
|
channel,
|
||||||
center,
|
center,
|
||||||
|
@ -465,7 +463,6 @@ fn load(input: &[u8]) -> IResult<&[u8], Result<Command, Error>> {
|
||||||
|input| {
|
|input| {
|
||||||
let (input, _) = whitespace(input)?;
|
let (input, _) = whitespace(input)?;
|
||||||
let (input, channel) = channel(input)?;
|
let (input, channel) = channel(input)?;
|
||||||
let (input, _) = end(input)?;
|
|
||||||
Ok((input, Some(channel)))
|
Ok((input, Some(channel)))
|
||||||
},
|
},
|
||||||
value(None, end)
|
value(None, end)
|
||||||
|
@ -481,7 +478,6 @@ fn save(input: &[u8]) -> IResult<&[u8], Result<Command, Error>> {
|
||||||
|input| {
|
|input| {
|
||||||
let (input, _) = whitespace(input)?;
|
let (input, _) = whitespace(input)?;
|
||||||
let (input, channel) = channel(input)?;
|
let (input, channel) = channel(input)?;
|
||||||
let (input, _) = end(input)?;
|
|
||||||
Ok((input, Some(channel)))
|
Ok((input, Some(channel)))
|
||||||
},
|
},
|
||||||
value(None, end)
|
value(None, end)
|
||||||
|
|
Loading…
Reference in New Issue