Skip to content

[prism] Support method modifier calls#541

Merged
reese merged 1 commit intotrunkfrom
reese-method-def-modifiers
Apr 14, 2025
Merged

[prism] Support method modifier calls#541
reese merged 1 commit intotrunkfrom
reese-method-def-modifiers

Conversation

@reese
Copy link
Collaborator

@reese reese commented Apr 14, 2025

This adds special handling for method modifiers like private/protected/etc., which are special-cased to always format like private def foo instead of using parens.

@reese reese requested a review from froydnj April 14, 2025 17:35
Comment on lines +1102 to +1119
if arguments.arguments().iter().count() == 1
&& arguments
.arguments()
.iter()
.next()
.unwrap()
.as_def_node()
.is_some()
{
ps.emit_space();

let def_node = arguments
.arguments()
.iter()
.next()
.unwrap()
.as_def_node()
.unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Faster let_chains stabilization, please: rust-lang/rust#53667

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Literally the exact reason I made #540 😆

@reese reese merged commit 3934316 into trunk Apr 14, 2025
7 checks passed
@reese reese deleted the reese-method-def-modifiers branch April 14, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants