Skip to content

Commit 64c6e51

Browse files
committed
Fix pattern matching ref/deref
Clippy emits: warning: deref on an immutable reference Remove the explicit reference and use `ref` when pattern matching.
1 parent a923855 commit 64c6e51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/descriptor/tr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ where
354354
fn next(&mut self) -> Option<Self::Item> {
355355
while !self.stack.is_empty() {
356356
let (depth, last) = self.stack.pop().expect("Size checked above");
357-
match &*last {
358-
TapTree::Tree(l, r) => {
357+
match *last {
358+
TapTree::Tree(ref l, ref r) => {
359359
self.stack.push((depth + 1, r));
360360
self.stack.push((depth + 1, l));
361361
}

0 commit comments

Comments
 (0)