Skip to content

Commit 0889d53

Browse files
Bump MSRV to 1.88 (#15935)
And bump the `rust-toolchain.toml` to `1.90`. Per our versioning policy.
1 parent 4c2d9e1 commit 0889d53

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resolver = "2"
1212

1313
[workspace.package]
1414
edition = "2024"
15-
rust-version = "1.87"
15+
rust-version = "1.88"
1616
homepage = "https://pypi.org/project/uv/"
1717
documentation = "https://pypi.org/project/uv/"
1818
repository = "https://github.com/astral-sh/uv"

crates/uv-console/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ pub fn input(prompt: &str, term: &Term) -> std::io::Result<String> {
150150
chars.remove(position);
151151
let line_size = term.size().1 as usize;
152152
// Case we want to delete last char of a line so the cursor is at the beginning of the next line
153-
if (position + prompt_len) % (line_size - 1) == 0 {
153+
if (position + prompt_len).is_multiple_of(line_size - 1) {
154154
term.clear_line()?;
155155
term.move_cursor_up(1)?;
156156
term.move_cursor_right(line_size + 1)?;
@@ -183,7 +183,7 @@ pub fn input(prompt: &str, term: &Term) -> std::io::Result<String> {
183183
term.flush()?;
184184
}
185185
Key::ArrowLeft if position > 0 => {
186-
if (position + prompt_len) % term.size().1 as usize == 0 {
186+
if (position + prompt_len).is_multiple_of(term.size().1 as usize) {
187187
term.move_cursor_up(1)?;
188188
term.move_cursor_right(term.size().1 as usize)?;
189189
} else {
@@ -193,7 +193,7 @@ pub fn input(prompt: &str, term: &Term) -> std::io::Result<String> {
193193
term.flush()?;
194194
}
195195
Key::ArrowRight if position < chars.len() => {
196-
if (position + prompt_len) % (term.size().1 as usize - 1) == 0 {
196+
if (position + prompt_len).is_multiple_of(term.size().1 as usize - 1) {
197197
term.move_cursor_down(1)?;
198198
term.move_cursor_left(term.size().1 as usize)?;
199199
} else {

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.89"
2+
channel = "1.90"

0 commit comments

Comments
 (0)