-
Notifications
You must be signed in to change notification settings - Fork 889
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
impl rewrite_result for ast::Expr #6311
Conversation
macro_rules! skip_out_of_file_lines_range { | ||
($self:ident, $span:expr) => { | ||
if out_of_file_lines_range!($self, $span) { | ||
return None; | ||
} | ||
}; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now this is totally replaced with skip_out_of_file_lines_range!
which returns RewriteError::SkipFormatting
instead of None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean skip_out_of_file_lines_range_err
? In a follow up PR I think it would be nice to rename skip_out_of_file_lines_range_err
back to skip_out_of_file_lines_range!
Now that we know we've replaced all the invocations to return RewriteResult
. I'm not in a rush to make this change though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see format_expr
return RewriteResult
👍
619a862
to
0ccb6b6
Compare
Running the Diff-Check Edit: Job passed ✅ |
tracked by #6206
Description
This pr impl
rewrite_result
forExpr
by updatingformat_expr
to returnRewriteResult
.Now we don't call
.ok()
after callingrewrite_***
functions informat_expr
:)