summaryrefslogtreecommitdiff
path: root/dhall_syntax
diff options
context:
space:
mode:
authorNadrieril2019-09-10 17:41:40 +0200
committerNadrieril2019-09-10 17:41:40 +0200
commitf1a4d315de5be701f29beb7d3c32af2e96f967b6 (patch)
treeb2af34d3370484da38b3ba2841dd6e7ec7ffa5ab /dhall_syntax
parent50f586844c096d98a7d5b07332a6a77dac4ec933 (diff)
No need to force user data to be a reference
Diffstat (limited to 'dhall_syntax')
-rw-r--r--dhall_syntax/src/parser.rs17
1 files changed, 6 insertions, 11 deletions
diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs
index 74d2731..d945435 100644
--- a/dhall_syntax/src/parser.rs
+++ b/dhall_syntax/src/parser.rs
@@ -19,8 +19,7 @@ use crate::*;
type ParsedText<E> = InterpolatedText<Expr<E>>;
type ParsedTextContents<E> = InterpolatedTextContents<Expr<E>>;
-type ParseInput<'input, 'data> =
- pest_consume::Node<'input, 'data, Rule, Rc<str>>;
+type ParseInput<'input> = pest_consume::Node<'input, Rule, Rc<str>>;
pub type ParseError = pest::error::Error<Rule>;
pub type ParseResult<T> = Result<T, ParseError>;
@@ -286,20 +285,16 @@ impl DhallParser {
}
))
}
- fn single_quote_char<'a>(
- input: ParseInput<'a, '_>,
- ) -> ParseResult<&'a str> {
+ fn single_quote_char<'a>(input: ParseInput<'a>) -> ParseResult<&'a str> {
Ok(input.as_str())
}
#[alias(single_quote_char)]
- fn escaped_quote_pair<'a>(
- _input: ParseInput<'a, '_>,
- ) -> ParseResult<&'a str> {
+ fn escaped_quote_pair<'a>(_input: ParseInput<'a>) -> ParseResult<&'a str> {
Ok("''")
}
#[alias(single_quote_char)]
fn escaped_interpolation<'a>(
- _input: ParseInput<'a, '_>,
+ _input: ParseInput<'a>,
) -> ParseResult<&'a str> {
Ok("${")
}
@@ -555,7 +550,7 @@ impl DhallParser {
))
}
fn posix_environment_variable_character<'a>(
- input: ParseInput<'a, '_>,
+ input: ParseInput<'a>,
) -> ParseResult<&'a str> {
Ok(match input.as_str() {
"\\\"" => "\"",
@@ -952,7 +947,7 @@ pub fn parse_expr<E: Clone>(input_str: &str) -> ParseResult<Expr<E>> {
let inputs = DhallParser::parse_with_userdata(
Rule::final_expression,
input_str,
- &rc_input_str,
+ rc_input_str,
)?;
Ok(match_inputs!(<DhallParser>; inputs;
[expression(e)] => e,