Skip to content

Commit aba6b42

Browse files
authored
chore(deps): pin rust version, fix lints (#503)
1 parent 534e8ef commit aba6b42

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/rust.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- run: rustup component add clippy rustfmt
1716
- uses: actions/checkout@v4
17+
- run: rustup toolchain install --profile minimal
1818
- name: Rust Cache
1919
uses: Swatinem/rust-cache@v2
2020
- name: Check format
@@ -34,6 +34,7 @@ jobs:
3434
target: [x86_64-unknown-linux-musl, x86_64-pc-windows-gnu]
3535
steps:
3636
- uses: actions/checkout@v4
37+
- run: rustup toolchain install --profile minimal
3738
- name: Rust Cache
3839
uses: Swatinem/rust-cache@v2
3940
with:

rust-toolchain.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[toolchain]
2+
channel = "1.96.0"
3+
components = ["clippy", "rustfmt"]

src/tui.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ pub(crate) fn prompt() -> String {
3030
eprint!("{}", c);
3131
let _ = stderr().flush();
3232
}
33-
KeyCode::Backspace => {
34-
if !line.is_empty() {
35-
line.pop();
33+
KeyCode::Backspace if !line.is_empty() => {
34+
line.pop();
3635

37-
eprint!("\x08 \x08");
38-
let _ = stderr().flush();
39-
}
36+
eprint!("\x08 \x08");
37+
let _ = stderr().flush();
4038
}
4139
_ => {}
4240
}

0 commit comments

Comments
 (0)