From 0889d53c25f2c5e065029d13e416bc8d102e3f57 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 18 Sep 2025 14:00:39 -0400 Subject: [PATCH] Bump MSRV to 1.88 (#15935) And bump the `rust-toolchain.toml` to `1.90`. Per our versioning policy. --- Cargo.toml | 2 +- crates/uv-console/src/lib.rs | 6 +++--- rust-toolchain.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3d6b64f59..eb27c294b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ resolver = "2" [workspace.package] edition = "2024" -rust-version = "1.87" +rust-version = "1.88" homepage = "https://pypi.org/project/uv/" documentation = "https://pypi.org/project/uv/" repository = "https://github.com/astral-sh/uv" diff --git a/crates/uv-console/src/lib.rs b/crates/uv-console/src/lib.rs index d1476f5c7..f008c4c03 100644 --- a/crates/uv-console/src/lib.rs +++ b/crates/uv-console/src/lib.rs @@ -150,7 +150,7 @@ pub fn input(prompt: &str, term: &Term) -> std::io::Result { chars.remove(position); let line_size = term.size().1 as usize; // Case we want to delete last char of a line so the cursor is at the beginning of the next line - if (position + prompt_len) % (line_size - 1) == 0 { + if (position + prompt_len).is_multiple_of(line_size - 1) { term.clear_line()?; term.move_cursor_up(1)?; term.move_cursor_right(line_size + 1)?; @@ -183,7 +183,7 @@ pub fn input(prompt: &str, term: &Term) -> std::io::Result { term.flush()?; } Key::ArrowLeft if position > 0 => { - if (position + prompt_len) % term.size().1 as usize == 0 { + if (position + prompt_len).is_multiple_of(term.size().1 as usize) { term.move_cursor_up(1)?; term.move_cursor_right(term.size().1 as usize)?; } else { @@ -193,7 +193,7 @@ pub fn input(prompt: &str, term: &Term) -> std::io::Result { term.flush()?; } Key::ArrowRight if position < chars.len() => { - if (position + prompt_len) % (term.size().1 as usize - 1) == 0 { + if (position + prompt_len).is_multiple_of(term.size().1 as usize - 1) { term.move_cursor_down(1)?; term.move_cursor_left(term.size().1 as usize)?; } else { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4f3e8c521..73328e053 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.89" +channel = "1.90"