From 184b82018d0897a9e1a9c50d9a5bb283a18a300e Mon Sep 17 00:00:00 2001 From: gwenn Date: Sat, 13 Apr 2024 10:21:24 +0200 Subject: [PATCH 1/2] Update github actions --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c4e8503b2..98158be5f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -29,8 +29,8 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2.2.0 + - uses: actions/checkout@v4 + - uses: Swatinem/rust-cache@v2 - name: Build run: cargo build --workspace --all-targets - name: Run tests From db6c5d7e6a25f423b9217c1c647e7eafc7e539aa Mon Sep 17 00:00:00 2001 From: gwenn Date: Sat, 13 Apr 2024 10:31:36 +0200 Subject: [PATCH 2/2] Fix clippy warnings --- src/line_buffer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/line_buffer.rs b/src/line_buffer.rs index 329d71e43..3c7b403c6 100644 --- a/src/line_buffer.rs +++ b/src/line_buffer.rs @@ -1119,6 +1119,7 @@ impl LineBuffer { .map_or_else(|| self.buf.len(), |pos| end + pos); let mut index = start; if dedent { + #[allow(clippy::unnecessary_to_owned)] for line in self.buf[start..end].to_string().split('\n') { let max = line.len() - line.trim_start().len(); let deleting = min(max, amount); @@ -1134,6 +1135,7 @@ impl LineBuffer { index += line.len() + 1 - deleting; } } else { + #[allow(clippy::unnecessary_to_owned)] for line in self.buf[start..end].to_string().split('\n') { for off in (0..amount).step_by(INDENT.len()) { self.insert_str(index, &INDENT[..min(amount - off, INDENT.len())], cl);