Resolve redundant_clone lint

This commit is contained in:
David Tolnay 2019-10-08 21:16:45 -07:00
parent 52f6e96ee8
commit d4d737de8d
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -1937,7 +1937,7 @@ fn respan_token_stream(stream: TokenStream, span: Span) -> TokenStream {
fn respan_token_tree(mut token: TokenTree, span: Span) -> TokenTree { fn respan_token_tree(mut token: TokenTree, span: Span) -> TokenTree {
if let TokenTree::Group(g) = &mut token { if let TokenTree::Group(g) = &mut token {
*g = Group::new(g.delimiter(), respan_token_stream(g.stream().clone(), span)); *g = Group::new(g.delimiter(), respan_token_stream(g.stream(), span));
} }
token.set_span(span); token.set_span(span);
token token