rust: add take_until_and_consume replacement function

pull/4624/head
Pierre Chifflier 6 years ago committed by Victor Julien
parent 8664a55ee7
commit 030c9a3d86

@ -0,0 +1,12 @@
#[macro_export]
macro_rules! take_until_and_consume (
( $i:expr, $needle:expr ) => (
{
let input: &[u8] = $i;
let (rem, res) = ::nom::take_until!(input, $needle)?;
let (rem, _) = ::nom::take!(rem, $needle.len())?;
Ok((rem, res))
}
);
);

@ -40,6 +40,8 @@ pub mod log;
#[macro_use]
pub mod core;
#[macro_use]
pub mod common;
pub mod conf;
pub mod json;
#[macro_use]

Loading…
Cancel
Save