From eceaf94f1936436e33ae235ca65bf2a6d4f77da5 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 18 Feb 2020 15:32:19 +0200 Subject: More manual clippy fixes --- crates/ra_mbe/src/parser.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'crates/ra_mbe') diff --git a/crates/ra_mbe/src/parser.rs b/crates/ra_mbe/src/parser.rs index 1cdebc216..10a6f300a 100644 --- a/crates/ra_mbe/src/parser.rs +++ b/crates/ra_mbe/src/parser.rs @@ -45,15 +45,15 @@ impl PartialEq for Separator { } } -pub(crate) fn parse_template<'a>( - template: &'a tt::Subtree, -) -> impl Iterator, ExpandError>> { +pub(crate) fn parse_template( + template: &tt::Subtree, +) -> impl Iterator, ExpandError>> { parse_inner(template, Mode::Template) } -pub(crate) fn parse_pattern<'a>( - pattern: &'a tt::Subtree, -) -> impl Iterator, ExpandError>> { +pub(crate) fn parse_pattern( + pattern: &tt::Subtree, +) -> impl Iterator, ExpandError>> { parse_inner(pattern, Mode::Pattern) } @@ -63,10 +63,7 @@ enum Mode { Template, } -fn parse_inner<'a>( - src: &'a tt::Subtree, - mode: Mode, -) -> impl Iterator, ExpandError>> { +fn parse_inner(src: &tt::Subtree, mode: Mode) -> impl Iterator, ExpandError>> { let mut src = TtIter::new(src); std::iter::from_fn(move || { let first = src.next()?; -- cgit v1.2.3