diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 228cb7ca..fd0d79bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,8 +28,8 @@ jobs: fail-fast: false matrix: toolchain: - - &MSRV "1.98" - nightly + - &MSRV "1.99" target: # Tier 1 platforms - aarch64-apple-darwin # ARM64 macOS (11.0+, Big Sur+) diff --git a/Cargo.toml b/Cargo.toml index 2f9c51cd..6304e5f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ keywords = ["editor", "terminal", "text-editor"] categories = ["text-editors", "development-tools"] include = ["src/", "tests/", "Cargo.toml", "Cargo.lock", "COPYRIGHT", "LICENSE-*"] version = "0.3.3" -rust-version = "1.98" +rust-version = "1.99" authors = ["Ilaï Deutel"] license = "MIT OR Apache-2.0" edition = "2024" @@ -120,6 +120,7 @@ same_name_method = "deny" semicolon_outside_block = "deny" separated_literal_suffix = "deny" str_to_string = "deny" +unnecessary_rest_pattern = "deny" unused_result_ok = "deny" unwrap_used = "deny" use_debug = "deny" diff --git a/src/editor.rs b/src/editor.rs index 956f640d..12444116 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -190,9 +190,10 @@ impl Editor { } self.cursor.x = cursor_x; } - // ← at the beginning of the line: move to the end of the previous line. The x - // position will be adjusted after this `match` to accommodate the current row - // length, so we can just set here to the maximum possible value here. + // ← at the beginning of the line: move to the end of the previous + // line. The x position will be adjusted after this `match` to + // accommodate the current row length, so we can just set here to + // the maximum possible value here. (AKey::Left, _) if self.cursor.y > 0 => (self.cursor.y, self.cursor.x) = (self.cursor.y - 1, usize::MAX), (AKey::Right, Some(row)) if self.cursor.x < row.chars.len() => { @@ -204,8 +205,8 @@ impl Editor { self.cursor.x = cursor_x; } (AKey::Right, Some(_)) => self.cursor.move_to_next_line(), - // TODO: For Up and Down, move self.cursor.x to be consistent with tabs and UTF-8 - // characters, i.e. according to rx + // TODO: For Up and Down, move self.cursor.x to be consistent with + // tabs and UTF-8 characters, i.e. according to rx (AKey::Up, _) if self.cursor.y > 0 => self.cursor.y -= 1, (AKey::Down, Some(_)) => self.cursor.y += 1, _ => (), @@ -832,7 +833,8 @@ impl PromptMode { PromptState::Active(b) => return Some(Self::GoTo(b)), PromptState::Cancelled => (), PromptState::Completed(b) => { - let mut split = b.splitn(2, ':') + let mut split = b + .splitn(2, ':') // saturating_sub: Lines and cols are 1-indexed .map(|u| u.trim().parse().map(|s: usize| s.saturating_sub(1))); match (split.next().transpose(), split.next().transpose()) {