mirror of
https://github.com/ratatui/ratatui.git
synced 2025-09-27 04:50:46 +00:00
chore: Update to Rust version 1.85.0 (#1860)
This is a small step toward fixing #1727
This commit is contained in:
parent
eacf9b6dbf
commit
7cb35d4be1
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user