Skip to content

[prism] Support method modifier calls #541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025
Merged

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