Skip to content

Commit eccd823

Browse files
authored
chore: catch up new practices (#9)
Signed-off-by: tison <wander4096@gmail.com>
1 parent e098fe0 commit eccd823

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
name: Check
3838
runs-on: ubuntu-22.04
3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v6
4141
- name: Install toolchain
4242
uses: dtolnay/rust-toolchain@nightly
4343
with:
@@ -46,7 +46,7 @@ jobs:
4646
- uses: taiki-e/install-action@v2
4747
with:
4848
tool: typos-cli,taplo-cli,hawkeye
49-
- run: cargo +nightly x lint
49+
- run: cargo x lint
5050

5151
test:
5252
name: Run tests
@@ -56,7 +56,7 @@ jobs:
5656
rust-version: [ "1.85.0", "stable" ]
5757
runs-on: ${{ matrix.os }}
5858
steps:
59-
- uses: actions/checkout@v5
59+
- uses: actions/checkout@v6
6060
- uses: Swatinem/rust-cache@v2
6161
- name: Delete rust-toolchain.toml
6262
run: rm rust-toolchain.toml

xtask/src/main.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct CommandTest {
6565

6666
impl CommandTest {
6767
fn run(self) {
68-
run_command(make_test_cmd(self.no_capture, true, &[]));
68+
run_command(make_test_cmd(self.no_capture, &[]));
6969
}
7070
}
7171

@@ -130,12 +130,9 @@ fn make_build_cmd(locked: bool) -> StdCommand {
130130
cmd
131131
}
132132

133-
fn make_test_cmd(no_capture: bool, default_features: bool, features: &[&str]) -> StdCommand {
133+
fn make_test_cmd(no_capture: bool, features: &[&str]) -> StdCommand {
134134
let mut cmd = find_command("cargo");
135-
cmd.args(["test", "--workspace"]);
136-
if !default_features {
137-
cmd.arg("--no-default-features");
138-
}
135+
cmd.args(["test", "--workspace", "--no-default-features"]);
139136
if !features.is_empty() {
140137
cmd.args(["--features", features.join(",").as_str()]);
141138
}
@@ -147,7 +144,7 @@ fn make_test_cmd(no_capture: bool, default_features: bool, features: &[&str]) ->
147144

148145
fn make_format_cmd(fix: bool) -> StdCommand {
149146
let mut cmd = find_command("cargo");
150-
cmd.args(["fmt", "--all"]);
147+
cmd.args(["+nightly", "fmt", "--all"]);
151148
if !fix {
152149
cmd.arg("--check");
153150
}
@@ -157,6 +154,7 @@ fn make_format_cmd(fix: bool) -> StdCommand {
157154
fn make_clippy_cmd(fix: bool) -> StdCommand {
158155
let mut cmd = find_command("cargo");
159156
cmd.args([
157+
"+nightly",
160158
"clippy",
161159
"--tests",
162160
"--all-features",

0 commit comments

Comments
 (0)