Skip to content

Commit 4366423

Browse files
committed
Resolve needless_borrow clippy lint
error: this expression borrows a reference (`&syn::parse::ParseBuffer`) that is immediately dereferenced by the compiler --> tests/test_parse_buffer.rs:15:35 | 15 | input1.advance_to(&input2); | ^^^^^^^ help: change this to: `input2` | = note: `-D clippy::needless-borrow` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
1 parent 2de9ea7 commit 4366423

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_parse_buffer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(clippy::needless_borrow, clippy::non_ascii_literal)]
1+
#![allow(clippy::non_ascii_literal)]
22

33
use proc_macro2::{Delimiter, Group, Punct, Spacing, TokenStream, TokenTree};
44
use std::iter::FromIterator;
@@ -12,7 +12,7 @@ fn smuggled_speculative_cursor_between_sources() {
1212
impl Parse for BreakRules {
1313
fn parse(input1: ParseStream) -> Result<Self> {
1414
let nested = |input2: ParseStream| {
15-
input1.advance_to(&input2);
15+
input1.advance_to(input2);
1616
Ok(Self)
1717
};
1818
nested.parse_str("")

0 commit comments

Comments
 (0)