mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 13:13:40 +00:00
Change the type of argument of push_vertical_spaces()
This commit is contained in:
parent
228578b9c7
commit
d96a48c517
@ -78,15 +78,14 @@ impl<'a> FmtVisitor<'a> {
|
||||
let snippet = self.snippet(span);
|
||||
if snippet.trim().is_empty() {
|
||||
// Keep vertical spaces within range.
|
||||
self.push_vertical_spaces(&snippet);
|
||||
self.push_vertical_spaces(count_newlines(&snippet));
|
||||
process_last_snippet(self, "", &snippet);
|
||||
} else {
|
||||
self.write_snippet(span, &process_last_snippet);
|
||||
}
|
||||
}
|
||||
|
||||
fn push_vertical_spaces(&mut self, original: &str) {
|
||||
let mut newline_count = count_newlines(original);
|
||||
fn push_vertical_spaces(&mut self, mut newline_count: usize) {
|
||||
let newline_upper_bound = self.config.blank_lines_upper_bound() + 1;
|
||||
let newline_lower_bound = self.config.blank_lines_lower_bound() + 1;
|
||||
if newline_count > newline_upper_bound {
|
||||
|
Loading…
Reference in New Issue
Block a user