Skip to content

Commit

Permalink
fix as_slice usage
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Mar 16, 2024
1 parent b76bb22 commit dd1cd62
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ pub(crate) fn bool_literal_compare(checker: &mut Checker, compare: &ast::ExprCom
return;
}
let comparator = compare.left.as_ref();
let [op, ..] = compare.ops.as_slice() else {

let [op, ..] = &*compare.ops else {
return;
};
let [next, ..] = compare.comparators.as_slice() else {

let [next, ..] = &*compare.comparators else {
return;
};

Expand Down

0 comments on commit dd1cd62

Please sign in to comment.