Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change visitor name to OppVisitor
  • Loading branch information
DevinR528 committed Apr 20, 2020
commit 930619b484893f52c22e6e3fce22422501d4e326
6 changes: 3 additions & 3 deletions clippy_lints/src/if_let_mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl LateLintPass<'_, '_> for IfLetMutex {
arm_lock: false,
cx,
};
let mut op_visit = IfLetMutexVisitor {
let mut op_visit = OppVisitor {
op_mutex: false,
op_lock: false,
cx,
Expand Down Expand Up @@ -80,13 +80,13 @@ impl LateLintPass<'_, '_> for IfLetMutex {
}

/// Checks if `Mutex::lock` is called in the `if let _ = expr.
pub struct IfLetMutexVisitor<'tcx, 'l> {
pub struct OppVisitor<'tcx, 'l> {
pub op_mutex: bool,
pub op_lock: bool,
pub cx: &'tcx LateContext<'tcx, 'l>,
}

impl<'tcx, 'l> Visitor<'tcx> for IfLetMutexVisitor<'tcx, 'l> {
impl<'tcx, 'l> Visitor<'tcx> for OppVisitor<'tcx, 'l> {
type Map = Map<'tcx>;

fn visit_expr(&mut self, expr: &'tcx Expr<'_>) {
Expand Down