Convert all functions to using the wrapped input type.
Some checks failed
rust-test Build rust-test has failed
rust-build Build rust-build has failed

This commit is contained in:
Tom Alexander
2023-08-23 00:30:26 -04:00
parent b7a5dd48ea
commit dab598e5e7
45 changed files with 1217 additions and 572 deletions

View File

@@ -8,6 +8,7 @@ use nom::combinator::verify;
use nom::multi::many1_count;
use nom::sequence::tuple;
use super::org_source::OrgSource;
use super::Context;
use crate::error::Res;
use crate::parser::util::start_of_line;
@@ -16,8 +17,8 @@ use crate::parser::HorizontalRule;
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
pub fn horizontal_rule<'r, 's>(
context: Context<'r, 's>,
input: &'s str,
) -> Res<&'s str, HorizontalRule<'s>> {
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, HorizontalRule<'s>> {
start_of_line(context, input)?;
let (remaining, rule) = recognize(tuple((
space0,
@@ -25,5 +26,10 @@ pub fn horizontal_rule<'r, 's>(
space0,
alt((line_ending, eof)),
)))(input)?;
Ok((remaining, HorizontalRule { source: rule }))
Ok((
remaining,
HorizontalRule {
source: rule.into(),
},
))
}