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

pull/3480/head
Saber Haj Rabiee 2 years ago committed by GitHub
parent bdd1192a35
commit 1577a9d0ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save