Update RefContext to three lifetimes.

This commit is contained in:
Tom Alexander
2023-09-02 22:45:46 -04:00
parent ba57eb16fd
commit 74a6101de7
41 changed files with 200 additions and 200 deletions

View File

@@ -49,7 +49,7 @@ const ORG_LINK_PARAMETERS: [&'static str; 23] = [
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
pub fn plain_link<'r, 's>(
context: RefContext<'r, 's>,
context: RefContext<'_, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, PlainLink<'s>> {
let (remaining, _) = pre(context, input)?;
@@ -69,7 +69,7 @@ pub fn plain_link<'r, 's>(
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn pre<'r, 's>(_context: RefContext<'r, 's>, input: OrgSource<'s>) -> Res<OrgSource<'s>, ()> {
fn pre<'r, 's>(_context: RefContext<'_, 'r, 's>, input: OrgSource<'s>) -> Res<OrgSource<'s>, ()> {
let preceding_character = input.get_preceding_character();
match preceding_character {
// If None, we are at the start of the file which is fine
@@ -86,14 +86,14 @@ fn pre<'r, 's>(_context: RefContext<'r, 's>, input: OrgSource<'s>) -> Res<OrgSou
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn post<'r, 's>(_context: RefContext<'r, 's>, input: OrgSource<'s>) -> Res<OrgSource<'s>, ()> {
fn post<'r, 's>(_context: RefContext<'_, 'r, 's>, input: OrgSource<'s>) -> Res<OrgSource<'s>, ()> {
let (remaining, _) = alt((eof, recognize(none_of(WORD_CONSTITUENT_CHARACTERS))))(input)?;
Ok((remaining, ()))
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
pub fn protocol<'r, 's>(
_context: RefContext<'r, 's>,
_context: RefContext<'_, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
// TODO: This should be defined by org-link-parameters
@@ -114,7 +114,7 @@ pub fn protocol<'r, 's>(
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn path_plain<'r, 's>(
context: RefContext<'r, 's>,
context: RefContext<'_, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
// TODO: "optionally containing parenthesis-wrapped non-whitespace non-bracket substrings up to a depth of two. The string must end with either a non-punctation non-whitespace character, a forwards slash, or a parenthesis-wrapped substring"
@@ -136,7 +136,7 @@ fn path_plain<'r, 's>(
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn path_plain_end<'r, 's>(
_context: RefContext<'r, 's>,
_context: RefContext<'_, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
recognize(many_till(