Skip to content

Commit

Permalink
Merge pull request #773 from gwenn/ci
Browse files Browse the repository at this point in the history
Update github actions
  • Loading branch information
gwenn authored Apr 13, 2024
2 parents bdbcc7f + db6c5d7 commit beaa717
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/line_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit beaa717

Please sign in to comment.