From cfb5d3fd45a810e5cde6811b039d154241d1444c Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Tue, 28 Dec 2021 12:23:06 +0000 Subject: Fix clippy warnings --- mlua_derive/src/token.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mlua_derive/src') diff --git a/mlua_derive/src/token.rs b/mlua_derive/src/token.rs index 0173118..95eba3d 100644 --- a/mlua_derive/src/token.rs +++ b/mlua_derive/src/token.rs @@ -175,8 +175,7 @@ impl Tokens { pub(crate) fn retokenize(tt: TokenStream) -> Tokens { Tokens( tt.into_iter() - .map(Tokens::from) - .flatten() + .flat_map(Tokens::from) .peekable() .batching(|iter| { // Find variable tokens @@ -217,7 +216,7 @@ impl From for Tokens { vec![Token::new_delim(b, tt.clone(), true)] .into_iter() - .chain(g.stream().into_iter().map(Tokens::from).flatten()) + .chain(g.stream().into_iter().flat_map(Tokens::from)) .chain(vec![Token::new_delim(e, tt, false)]) .collect() } -- cgit v1.2.3