Skip to content

Commit

Permalink
refactor(linter): unicorn/no_useless_switch_case rule use `std::ptr…
Browse files Browse the repository at this point in the history
…::eq`
  • Loading branch information
overlookmotel committed Sep 9, 2024
1 parent e38114b commit 8003984
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Rule for NoUselessSwitchCase {
let default_case = default_cases[0];

// Check if the `default` case is the last case
if std::ptr::from_ref(default_case) != std::ptr::from_ref(cases.last().unwrap()) {
if !std::ptr::eq(default_case, cases.last().unwrap()) {
return;
}

Expand Down

0 comments on commit 8003984

Please sign in to comment.