-
Notifications
You must be signed in to change notification settings - Fork 931
Read the original file for comparing/detecting newline #4236
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
Read the original file for comparing/detecting newline #4236
Conversation
bbe7fa1
to
0cf74df
Compare
std::io::Error::from(std::io::ErrorKind::InvalidInput), | ||
))?)?, | ||
}; | ||
apply_newline_style(config.newline_style(), &mut visitor.buffer, &original_text); |
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.
We need to pass the original file content to apply_newline_style
.
@@ -206,13 +206,6 @@ impl ParseSess { | |||
Rc::clone(source_file.src.as_ref().unwrap()), | |||
) | |||
} | |||
|
|||
pub(crate) fn get_original_snippet(&self, file_name: &FileName) -> Option<Rc<String>> { |
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.
This method is no longer used, and thus removed.
@@ -62,9 +62,6 @@ impl SnippetProvider { | |||
} | |||
} | |||
|
|||
pub(crate) fn entire_snippet(&self) -> &str { |
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.
This method is no longer used, and thus removed.
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.
👍
Close #4097.