Skip to content

Conversation

ding-young
Copy link
Contributor

Tracked by #6206

Description

  • refactor visit_struct and visit_enum
  • update related functions like format_struct_struct, rewrite_with_alignment to return RewriteResult

let rewrite = format_struct(&self.get_context(), struct_parts, self.block_indent, None)
.map(|s| if is_tuple { s + ";" } else { s });
self.push_rewrite(struct_parts.span, rewrite);
self.push_rewrite(struct_parts.span, rewrite.ok());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After majority of visit_*** functions are refactored, we'll have to report RewriteError instead of calling rewrite.ok()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants