Skip to content

Commit 38efff4

Browse files
authored
Rename visit_expr to expr_leaf_spans (#2914)
Closes #2500
1 parent 85d9abe commit 38efff4

File tree

1 file changed

+3
-3
lines changed
  • swayfmt/src/utils/language/expr

1 file changed

+3
-3
lines changed

swayfmt/src/utils/language/expr/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,18 +710,18 @@ fn get_field_width(
710710
// TODO: Find a better way of handling Boxed version
711711
impl LeafSpans for Box<Expr> {
712712
fn leaf_spans(&self) -> Vec<ByteSpan> {
713-
visit_expr(self)
713+
expr_leaf_spans(self)
714714
}
715715
}
716716

717717
impl LeafSpans for Expr {
718718
fn leaf_spans(&self) -> Vec<ByteSpan> {
719-
visit_expr(self)
719+
expr_leaf_spans(self)
720720
}
721721
}
722722

723723
/// Collects various expr field's ByteSpans.
724-
fn visit_expr(expr: &Expr) -> Vec<ByteSpan> {
724+
fn expr_leaf_spans(expr: &Expr) -> Vec<ByteSpan> {
725725
match expr {
726726
Expr::Error(_) => vec![expr.span().into()],
727727
Expr::Path(path) => path.leaf_spans(),

0 commit comments

Comments
 (0)