Do not include context in tracing.

This commit is contained in:
Tom Alexander
2023-10-09 18:00:48 -04:00
parent 5cd34ba3a2
commit df4daa0e16
46 changed files with 852 additions and 234 deletions

View File

@@ -46,7 +46,10 @@ pub(crate) fn detect_subscript_or_superscript<'s>(input: OrgSource<'s>) -> Res<O
Ok((input, ()))
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[cfg_attr(
feature = "tracing",
tracing::instrument(ret, level = "debug", skip(context))
)]
pub(crate) fn subscript<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
@@ -66,7 +69,10 @@ pub(crate) fn subscript<'b, 'g, 'r, 's>(
))
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[cfg_attr(
feature = "tracing",
tracing::instrument(ret, level = "debug", skip(context))
)]
pub(crate) fn superscript<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
@@ -98,7 +104,10 @@ enum ScriptBody<'s> {
WithBraces(Vec<Object<'s>>),
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[cfg_attr(
feature = "tracing",
tracing::instrument(ret, level = "debug", skip(context))
)]
fn script_body<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
@@ -120,7 +129,10 @@ fn script_body<'b, 'g, 'r, 's>(
))(input)
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[cfg_attr(
feature = "tracing",
tracing::instrument(ret, level = "debug", skip(_context))
)]
fn script_asterisk<'b, 'g, 'r, 's>(
_context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
@@ -128,7 +140,10 @@ fn script_asterisk<'b, 'g, 'r, 's>(
tag("*")(input)
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[cfg_attr(
feature = "tracing",
tracing::instrument(ret, level = "debug", skip(_context))
)]
fn script_alphanum<'b, 'g, 'r, 's>(
_context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
@@ -157,7 +172,10 @@ fn end_script_alphanum_character<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>,
Ok((remaining, final_char))
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[cfg_attr(
feature = "tracing",
tracing::instrument(ret, level = "debug", skip(context))
)]
fn script_with_braces<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
@@ -185,7 +203,10 @@ fn script_with_braces_end(starting_brace_depth: BracketDepth) -> impl ContextMat
}
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[cfg_attr(
feature = "tracing",
tracing::instrument(ret, level = "debug", skip(_context))
)]
fn _script_with_braces_end<'b, 'g, 'r, 's>(
_context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
@@ -205,7 +226,10 @@ fn _script_with_braces_end<'b, 'g, 'r, 's>(
tag("}")(input)
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[cfg_attr(
feature = "tracing",
tracing::instrument(ret, level = "debug", skip(context))
)]
fn script_with_parenthesis<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,