style: fixes unused_parens warnings on nightly builds (#3471)

This commit is contained in:
Saber Haj Rabiee 2022-08-18 16:07:18 -07:00 committed by GitHub
parent bdd1192a35
commit 1577a9d0ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -875,8 +875,8 @@ fn goto_window(cx: &mut Context, align: Align) {
let last_line = view.last_line(doc); let last_line = view.last_line(doc);
let line = match align { let line = match align {
Align::Top => (view.offset.row + scrolloff + count), Align::Top => view.offset.row + scrolloff + count,
Align::Center => (view.offset.row + ((last_line - view.offset.row) / 2)), Align::Center => view.offset.row + ((last_line - view.offset.row) / 2),
Align::Bottom => last_line.saturating_sub(scrolloff + count), Align::Bottom => last_line.saturating_sub(scrolloff + count),
} }
.max(view.offset.row + scrolloff) .max(view.offset.row + scrolloff)