Skip to content

Conversation

bungcip
Copy link
Contributor

@bungcip bungcip commented Oct 9, 2025

visit_node in conversion.rs is very big, this PR try to split the function and use early return to reduce rightward drift

@@ -583,8 +583,7 @@ impl ConversionContext {
})
}

/// Visit one node.
fn visit_node(
fn convert_node_as_type(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

bikeshedding welcome for the function name

Copy link
Contributor

Choose a reason for hiding this comment

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

fn visit_type_node perhaps? Otherwise this LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

visit_node_type already exist, so naming it visit_type_node will make it more confusing😅

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, node_as_type is okay then, but I think visit should be kept.

@kkysen kkysen self-requested a review October 9, 2025 18:32
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