-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesT-ASTType: Requires working with the ASTType: Requires working with the ASTgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
Another example from Carboxyl:
match &mut *current.borrow_mut() {
&mut Some(ref mut trans) => action(trans),
_ => panic!("there is no active transaction to register a callback"),
}
Our lint suggests using match *&mut *current.borrow_mut() { .. }
while actually match *current.borrow_mut() { .. }
(and removing &mut
in the arm) will suffice.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesT-ASTType: Requires working with the ASTType: Requires working with the ASTgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy