Rename Comments methods (#6649)

This commit is contained in:
Micha Reiser 2023-08-18 08:37:01 +02:00 committed by GitHub
parent 3ceb6fbeb0
commit 0cea4975fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 128 additions and 172 deletions

View file

@ -22,7 +22,7 @@ impl FormatNodeRule<MatchCase> for FormatMatchCase {
} = item;
let comments = f.context().comments().clone();
let dangling_item_comments = comments.dangling_comments(item);
let dangling_item_comments = comments.dangling(item);
write!(
f,
@ -33,7 +33,7 @@ impl FormatNodeRule<MatchCase> for FormatMatchCase {
&format_with(|f| {
write!(f, [text("case"), space()])?;
let leading_pattern_comments = comments.leading_comments(pattern);
let leading_pattern_comments = comments.leading(pattern);
if !leading_pattern_comments.is_empty() {
parenthesized(
"(",