Skip to content

Commit

Permalink
clippy fix -- replace closure with static reference to method
Browse files Browse the repository at this point in the history
  • Loading branch information
plredmond committed May 14, 2024
1 parent 4a1b15b commit 31dd04d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ruff_linter/src/fix/edits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ pub(crate) fn add_to_dunder_all<'a>(
let (insertion_point, export_prefix_length) = match expr {
Expr::List(ExprList { elts, range, .. }) => (
elts.last()
.map_or(range.end() - "]".text_len(), |elt| elt.end()),
.map_or(range.end() - "]".text_len(), Ranged::end),
elts.len(),
),
Expr::Tuple(tup) if tup.parenthesized => (
tup.elts
.last()
.map_or(tup.end() - ")".text_len(), |elt| elt.end()),
.map_or(tup.end() - ")".text_len(), Ranged::end),
tup.elts.len(),
),
Expr::Tuple(tup) if !tup.parenthesized => (
Expand Down

0 comments on commit 31dd04d

Please sign in to comment.