From f58b6e9c6b341386fb51d1a54b8366f602fe06bf Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Wed, 22 Jul 2026 15:49:02 +0200 Subject: [PATCH 1/2] Fix release pipeline --- .pipelines/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pipelines/release.yml b/.pipelines/release.yml index 6654032bbb7..704e6eaf887 100644 --- a/.pipelines/release.yml +++ b/.pipelines/release.yml @@ -47,6 +47,7 @@ extends: template: v2/Microsoft.${{parameters.official}}.yml@GovernedTemplates parameters: featureFlags: + autoBaseline: false WindowsHostVersion: Version: 2022 Network: R1 @@ -112,7 +113,7 @@ extends: - task: RustInstaller@1 displayName: Install Rust toolchain inputs: - rustVersion: ms-prod + rustVersion: ms-prod@llvm additionalTargets: x86_64-pc-windows-msvc aarch64-pc-windows-msvc # URL of an Azure Artifacts feed configured with a crates.io upstream. Must be within the current ADO collection. # NOTE: Azure Artifacts support for Rust is not yet public, but it is enabled for internal ADO organizations. From db0994c2229c2ab4d89ab017c287a477abae8b67 Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Wed, 22 Jul 2026 15:54:17 +0200 Subject: [PATCH 2/2] Fix clippy warnings --- crates/edit/build/i18n.rs | 4 +-- crates/edit/src/buffer/gap_buffer.rs | 39 +++++++++------------------- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/crates/edit/build/i18n.rs b/crates/edit/build/i18n.rs index 4f5b3821a3f..a01ca7a7451 100644 --- a/crates/edit/build/i18n.rs +++ b/crates/edit/build/i18n.rs @@ -142,7 +142,7 @@ pub fn generate(definitions: &str) -> String { pub enum LocId {{", ); - for (k, _) in translations.iter() { + for k in translations.keys() { _ = writeln!(out, " {k},"); } @@ -187,7 +187,7 @@ const TRANSLATIONS: [[&str; {}]; {}] = [ for lang in &languages { _ = writeln!(out, " ["); - for (_, v) in translations.iter() { + for v in translations.values() { const DEFAULT: &String = &String::new(); let v = v.get(lang).or_else(|| v.get("en")).unwrap_or(DEFAULT); _ = writeln!(out, " {v:?},"); diff --git a/crates/edit/src/buffer/gap_buffer.rs b/crates/edit/src/buffer/gap_buffer.rs index 401d0f08442..da4cc2769af 100644 --- a/crates/edit/src/buffer/gap_buffer.rs +++ b/crates/edit/src/buffer/gap_buffer.rs @@ -171,16 +171,11 @@ impl GapBuffer { } fn enlarge_gap(&mut self, len: usize) { - let gap_chunk; - let alloc_chunk; - - if matches!(self.buffer, BackingBuffer::VirtualMemory(..)) { - gap_chunk = LARGE_GAP_CHUNK; - alloc_chunk = LARGE_ALLOC_CHUNK; + let (gap_chunk, alloc_chunk) = if matches!(self.buffer, BackingBuffer::VirtualMemory(..)) { + (LARGE_GAP_CHUNK, LARGE_ALLOC_CHUNK) } else { - gap_chunk = SMALL_GAP_CHUNK; - alloc_chunk = SMALL_ALLOC_CHUNK; - } + (SMALL_GAP_CHUNK, SMALL_ALLOC_CHUNK) + }; let gap_len_old = self.gap_len; let gap_len_new = (len + gap_chunk + gap_chunk - 1) & !(gap_chunk - 1); @@ -333,38 +328,28 @@ impl GapBuffer { impl ReadableDocument for GapBuffer { fn read_forward(&self, off: usize) -> &[u8] { let off = off.min(self.text_length); - let beg; - let len; - if off < self.gap_off { + let (beg, len) = if off < self.gap_off { // Cursor is before the gap: We can read until the start of the gap. - beg = off; - len = self.gap_off - off; + (off, self.gap_off - off) } else { // Cursor is after the gap: We can read until the end of the buffer. - beg = off + self.gap_len; - len = self.text_length - off; - } + (off + self.gap_len, self.text_length - off) + }; unsafe { slice::from_raw_parts(self.text.add(beg).as_ptr(), len) } } fn read_backward(&self, off: usize) -> &[u8] { let off = off.min(self.text_length); - let beg; - let len; - if off <= self.gap_off { + let (beg, len) = if off <= self.gap_off { // Cursor is before the gap: We can read until the beginning of the buffer. - beg = 0; - len = off; + (0, off) } else { // Cursor is after the gap: We can read until the end of the gap. - beg = self.gap_off + self.gap_len; - // The cursor_off doesn't account of the gap_len. - // (This allows us to move the gap without recalculating the cursor position.) - len = off - self.gap_off; - } + (self.gap_off + self.gap_len, off - self.gap_off) + }; unsafe { slice::from_raw_parts(self.text.add(beg).as_ptr(), len) } }