chore: Update to Rust version 1.85.0 (#1860)

This is a small step toward fixing #1727
This commit is contained in:
Tyler Breisacher 2025-05-17 07:23:28 -07:00 committed by GitHub
parent eacf9b6dbf
commit 7cb35d4be1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 9 deletions

View File

@ -122,7 +122,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
toolchain: ["1.74.0", "stable"]
toolchain: ["1.85.0", "stable"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@ -191,7 +191,7 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: ["1.74.0", "stable"]
toolchain: ["1.85.0", "stable"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

View File

@ -24,7 +24,7 @@ readme = "README.md"
license = "MIT"
exclude = ["assets/*", ".github", "Makefile.toml", "CONTRIBUTING.md", "*.log", "tags"]
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.85.0"
[workspace.dependencies]
anstyle = "1"

View File

@ -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,

View File

@ -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),

View File

@ -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