Make the tracing macros optional.
This commit is contained in:
@@ -20,7 +20,7 @@ use crate::parser::util::get_consumed;
|
||||
use crate::parser::RadioLink;
|
||||
use crate::parser::RadioTarget;
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
pub fn radio_link<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, RadioLink<'s>> {
|
||||
let radio_targets = context
|
||||
.iter()
|
||||
@@ -48,7 +48,7 @@ pub fn radio_link<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s s
|
||||
))))
|
||||
}
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
pub fn rematch_target<'x, 'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
target: &'x Vec<Object<'x>>,
|
||||
@@ -79,7 +79,7 @@ pub fn rematch_target<'x, 'r, 's>(
|
||||
Ok((remaining, new_matches))
|
||||
}
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
pub fn radio_target<'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
input: &'s str,
|
||||
@@ -105,7 +105,7 @@ pub fn radio_target<'r, 's>(
|
||||
Ok((remaining, RadioTarget { source, children }))
|
||||
}
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
fn radio_target_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> {
|
||||
alt((tag("<"), tag(">"), line_ending))(input)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user