chore: Update to Rust version 1.85.0 (#1860)
This is a small step toward fixing #1727
This commit is contained in:
@@ -117,7 +117,7 @@ impl App {
|
||||
}
|
||||
}
|
||||
|
||||
fn cycle_marker(&mut self) {
|
||||
const fn cycle_marker(&mut self) {
|
||||
self.marker = match self.marker {
|
||||
Marker::Dot => Marker::Braille,
|
||||
Marker::Braille => Marker::Block,
|
||||
|
||||
@@ -128,7 +128,7 @@ impl App {
|
||||
format!("{}", self.window[0]),
|
||||
Style::default().add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(format!("{}", (self.window[0] + self.window[1]) / 2.0)),
|
||||
Span::raw(format!("{}", f64::midpoint(self.window[0], self.window[1]))),
|
||||
Span::styled(
|
||||
format!("{}", self.window[1]),
|
||||
Style::default().add_modifier(Modifier::BOLD),
|
||||
|
||||
@@ -60,24 +60,24 @@ impl App {
|
||||
}
|
||||
}
|
||||
|
||||
fn scroll_down(&mut self) {
|
||||
const fn scroll_down(&mut self) {
|
||||
self.vertical_scroll = self.vertical_scroll.saturating_add(1);
|
||||
self.vertical_scroll_state = self.vertical_scroll_state.position(self.vertical_scroll);
|
||||
}
|
||||
|
||||
fn scroll_up(&mut self) {
|
||||
const fn scroll_up(&mut self) {
|
||||
self.vertical_scroll = self.vertical_scroll.saturating_sub(1);
|
||||
self.vertical_scroll_state = self.vertical_scroll_state.position(self.vertical_scroll);
|
||||
}
|
||||
|
||||
fn scroll_left(&mut self) {
|
||||
const fn scroll_left(&mut self) {
|
||||
self.horizontal_scroll = self.horizontal_scroll.saturating_sub(1);
|
||||
self.horizontal_scroll_state = self
|
||||
.horizontal_scroll_state
|
||||
.position(self.horizontal_scroll);
|
||||
}
|
||||
|
||||
fn scroll_right(&mut self) {
|
||||
const fn scroll_right(&mut self) {
|
||||
self.horizontal_scroll = self.horizontal_scroll.saturating_add(1);
|
||||
self.horizontal_scroll_state = self
|
||||
.horizontal_scroll_state
|
||||
|
||||
Reference in New Issue
Block a user